diff -Nru netrunner-desktop-containment-4.11.1/CMakeLists.txt netrunner-desktop-containment-4.13.0/CMakeLists.txt --- netrunner-desktop-containment-4.11.1/CMakeLists.txt 2014-01-02 18:48:32.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/CMakeLists.txt 2014-05-26 15:31:27.000000000 +0000 @@ -12,12 +12,6 @@ find_package(KDE4 4.10.60 REQUIRED) include (KDE4Defaults) -find_package(Strigi) -set_package_properties(Strigi PROPERTIES DESCRIPTION "Desktop indexing and search support" - URL "http://strigi.sourceforge.net" - TYPE REQUIRED - ) - find_package(ZLIB) set_package_properties(ZLIB PROPERTIES DESCRIPTION "Support for gzip compressed files and data streams" URL "http://www.zlib.net" diff -Nru netrunner-desktop-containment-4.11.1/debian/.bzr-builddeb/default.conf netrunner-desktop-containment-4.13.0/debian/.bzr-builddeb/default.conf --- netrunner-desktop-containment-4.11.1/debian/.bzr-builddeb/default.conf 2014-01-02 18:48:32.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/debian/.bzr-builddeb/default.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -[BUILDDEB] -merge = True diff -Nru netrunner-desktop-containment-4.11.1/debian/bzr-builder.manifest netrunner-desktop-containment-4.13.0/debian/bzr-builder.manifest --- netrunner-desktop-containment-4.11.1/debian/bzr-builder.manifest 2014-01-02 18:48:32.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/debian/bzr-builder.manifest 2014-05-26 15:31:27.000000000 +0000 @@ -1,3 +1,3 @@ -# bzr-builder format 0.3 deb-version 4.11.1-0ubuntu1+r18122+20140102~4 -lp:~blue-shell/kde-baseapps/netrunner-desktop-containment-4.11 revid:git-v1:f5efbb53e6c76dc107080cae34dc6b9c24147d27 -nest packaging lp:~blue-shell/kde-baseapps/netrunner-desktop-containment-4.11-ubuntu debian revid:rohangarg@kubuntu.org-20130920153440-k7j4a9h3l9ghf87n +# bzr-builder format 0.3 deb-version 4:4.13.0-0ubuntu1+r18233+20140526~331 +lp:~blue-shell/kde-baseapps/netrunner-desktop-containment-4.13 revid:git-v1:209942018b8077aaaa5d7cf1655ddc6d5d12dec6 +nest-part packaging lp:~blue-shell/kde-baseapps/netrunner-desktop-containment-4.13-ubuntu debian debian revid:rohangarg@kubuntu.org-20140526150835-djpib9jk3u01oonj diff -Nru netrunner-desktop-containment-4.11.1/debian/changelog netrunner-desktop-containment-4.13.0/debian/changelog --- netrunner-desktop-containment-4.11.1/debian/changelog 2014-04-25 10:26:10.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/debian/changelog 2014-05-26 15:31:27.000000000 +0000 @@ -1,14 +1,99 @@ -netrunner-desktop-containment (4.11.1-0ubuntu1+r18122+20140102~4~ubuntu14.04.1) trusty; urgency=low +netrunner-desktop-containment (4:4.13.0-0ubuntu1+r18233+20140526~331~ubuntu14.04.1) trusty; urgency=low - * Build against trusty + * Auto build. - -- Leszek Lesner Fri, 25 Apr 2014 12:25:48 +0200 + -- Launchpad Package Builder Mon, 26 May 2014 15:31:27 +0000 -netrunner-desktop-containment (4.11.1-0ubuntu1+r18122+20140102~4~ubuntu13.10.1) saucy; urgency=low +netrunner-desktop-containment (4:4.13.0-0ubuntu1) trusty; urgency=medium - * Auto build. + * New upstream KDE Software Compilation release + + -- Jonathan Riddell Thu, 10 Apr 2014 21:45:43 +0100 + +netrunner-desktop-containment (4:4.12.97-0ubuntu1) trusty; urgency=medium + + * New upstream release candidate + + -- Philip Muškovac Wed, 02 Apr 2014 11:16:08 +0200 + +netrunner-desktop-containment (4:4.12.95-0ubuntu1) trusty; urgency=medium + + * New upstream beta release + + -- Rohan Garg Sun, 23 Mar 2014 12:04:20 +0100 + +netrunner-desktop-containment (4:4.12.90-0ubuntu2) trusty; urgency=medium + + * Drop nepomuk-core-dev and libnepomukwidgets-dev from build-depends, + obsolete + + -- Philip Muškovac Thu, 20 Mar 2014 14:11:24 +0100 + +netrunner-desktop-containment (4:4.12.90-0ubuntu1) trusty; urgency=medium + + [ Jonathan Riddell ] + * new upstream alpha release + * bump version of konqueror replaces netrunner-desktop-containment-data to fix upgrade + from precise + * New upstream beta release + + [ Philip Muškovac ] + * Add new useragent services to netrunner-desktop-containment-data.install + * Build-depend on + libkfilemetadata-dev, baloo-dev, libaloowidgets-dev >= 4:4.12.80 + + -- Jonathan Riddell Wed, 19 Mar 2014 10:44:23 +0000 + +netrunner-desktop-containment (4:4.12.3-0ubuntu1) trusty; urgency=medium + + * Dropped kubuntu_konq_scans_nsplugins_at_startup.diff + - Harald says : Not useful for us, should be upstreamed + * Dep-3'ify patches + * New upstream bugfix release + + -- Rohan Garg Tue, 04 Mar 2014 20:38:26 +0100 + +netrunner-desktop-containment (4:4.12.2-0ubuntu1) trusty; urgency=medium + + * New upstream bugfix release + + -- Rohan Garg Tue, 04 Feb 2014 23:48:32 +0000 + +netrunner-desktop-containment (4:4.12.1-0ubuntu1) trusty; urgency=low + + * New upstream bugfix release + + -- Rohan Garg Thu, 16 Jan 2014 08:06:49 +0000 + +netrunner-desktop-containment (4:4.12.0-0ubuntu1) trusty; urgency=low + + * New upstream release + + -- Jonathan Riddell Wed, 18 Dec 2013 16:40:26 +0000 + +netrunner-desktop-containment (4:4.11.97-0ubuntu1) trusty; urgency=low + + * New upstream RC release + + -- Jonathan Riddell Fri, 29 Nov 2013 12:44:31 +0000 + +netrunner-desktop-containment (4:4.11.95-0ubuntu1) trusty; urgency=low + + * New upstream beta release + + -- Rohan Garg Mon, 25 Nov 2013 17:53:38 +0100 + +netrunner-desktop-containment (4:4.11.80-0ubuntu1) trusty; urgency=low + + * New upstream beta release + + -- Rohan Garg Sat, 23 Nov 2013 17:34:16 +0100 + +netrunner-desktop-containment (4:4.11.2-0ubuntu1) saucy; urgency=low + + * New upstream bugfix release - -- Launchpad Package Builder Thu, 02 Jan 2014 18:48:32 +0000 + -- Jonathan Riddell Mon, 30 Sep 2013 14:03:56 +0100 netrunner-desktop-containment (4:4.11.1-0ubuntu1) saucy; urgency=low @@ -16,7 +101,7 @@ -- Howard Chan Fri, 06 Sep 2013 22:09:34 +0100 -kde-baseapps (4:4.11.0-0ubuntu1) saucy; urgency=low +netrunner-desktop-containment (4:4.11.0-0ubuntu1) saucy; urgency=low [ Howard Chan ] * New upstream release @@ -26,14 +111,14 @@ -- Jonathan Riddell Wed, 14 Aug 2013 00:04:24 +0100 -kde-baseapps (4:4.10.97-0ubuntu1) saucy; urgency=low +netrunner-desktop-containment (4:4.10.97-0ubuntu1) saucy; urgency=low * New upstream RC 2 release * New upstream RC 2 release -- Jonathan Riddell Fri, 26 Jul 2013 19:12:09 +0100 -kde-baseapps (4:4.10.95-0ubuntu1) saucy; urgency=low +netrunner-desktop-containment (4:4.10.95-0ubuntu1) saucy; urgency=low * New upstream RC release - refresh enable_debianabimanager.diff and enable_dlrestrictions.diff @@ -41,13 +126,13 @@ -- Philip Muškovac Fri, 19 Jul 2013 12:32:06 +0000 -kde-baseapps (4:4.10.90-0ubuntu1) saucy; urgency=low +netrunner-desktop-containment (4:4.10.90-0ubuntu1) saucy; urgency=low * New upstream bet release -- Michał Zając Fri, 28 Jun 2013 18:03:40 +0100 -kde-baseapps (4:4.10.80-0ubuntu1) saucy; urgency=low +netrunner-desktop-containment (4:4.10.80-0ubuntu1) saucy; urgency=low [ Rohan Garg ] * New upstream release @@ -60,22 +145,22 @@ -- Jonathan Riddell Fri, 21 Jun 2013 02:19:40 +0100 -kde-baseapps (4:4.10.4-0ubuntu1) saucy-proposed; urgency=low +netrunner-desktop-containment (4:4.10.4-0ubuntu1) saucy-proposed; urgency=low * New upstream bugfix release -- Rohan Garg Thu, 06 Jun 2013 23:40:55 +0100 -kde-baseapps (4:4.10.3-0ubuntu1) saucy; urgency=low +netrunner-desktop-containment (4:4.10.3-0ubuntu1) saucy; urgency=low * New upstream release * Merge with Debian, remaining changes: - - kde-baseapps-data replace/breaks old dolphin/konqueror + - netrunner-desktop-containment-data replace/breaks old dolphin/konqueror - Make konqueror.postinst install with alternates score 30 not 100 -- Jonathan Riddell Wed, 08 May 2013 16:08:50 +0000 -kde-baseapps (4:4.10.2-1) experimental; urgency=low +netrunner-desktop-containment (4:4.10.2-1) experimental; urgency=low * New upstream release. @@ -100,13 +185,13 @@ -- Sune Vuorela Wed, 03 Apr 2013 18:55:57 +0000 -kde-baseapps (4:4.10.2-0ubuntu1) raring; urgency=low +netrunner-desktop-containment (4:4.10.2-0ubuntu1) raring; urgency=low * New upstream bugfix release -- Philip Muškovac Sun, 31 Mar 2013 14:40:14 +0200 -kde-baseapps (4:4.10.1-0ubuntu1) raring-proposed; urgency=low +netrunner-desktop-containment (4:4.10.1-0ubuntu1) raring-proposed; urgency=low * New upstream bugfix release * Add new doc picture in dolphin.install @@ -115,19 +200,19 @@ -- Philip Muškovac Tue, 05 Mar 2013 15:24:08 +0000 -kde-baseapps (4:4.10.0-0ubuntu1) raring-proposed; urgency=low +netrunner-desktop-containment (4:4.10.0-0ubuntu1) raring-proposed; urgency=low * New upstream release -- Rohan Garg Wed, 06 Feb 2013 11:35:18 +0000 -kde-baseapps (4:4.9.98-0ubuntu1) raring-proposed; urgency=low +netrunner-desktop-containment (4:4.9.98-0ubuntu1) raring-proposed; urgency=low * New upstream release candidate -- Jonathan Riddell Fri, 18 Jan 2013 15:03:07 +0000 -kde-baseapps (4:4.9.97-0ubuntu1) raring; urgency=low +netrunner-desktop-containment (4:4.9.97-0ubuntu1) raring; urgency=low [ Philip Muškovac ] * New upstream release candidate @@ -137,7 +222,7 @@ -- Philip Muškovac Thu, 03 Jan 2013 22:27:33 +0100 -kde-baseapps (4:4.9.95-0ubuntu1) raring; urgency=low +netrunner-desktop-containment (4:4.9.95-0ubuntu1) raring; urgency=low [ Jonathan Riddell ] * New upstream RC release @@ -147,13 +232,13 @@ -- Jonathan Riddell Tue, 18 Dec 2012 23:20:34 +0000 -kde-baseapps (4:4.9.90-0ubuntu1) raring-proposed; urgency=low +netrunner-desktop-containment (4:4.9.90-0ubuntu1) raring-proposed; urgency=low * New upstream beta release -- Jonathan Riddell Fri, 07 Dec 2012 17:42:49 +0000 -kde-baseapps (4:4.9.80-0ubuntu1) raring; urgency=low +netrunner-desktop-containment (4:4.9.80-0ubuntu1) raring; urgency=low [ Jonathan Riddell ] * New upstream beta release @@ -166,38 +251,38 @@ -- Scott Kitterman Tue, 20 Nov 2012 14:33:18 -0500 -kde-baseapps (4:4.9.3-0ubuntu1) raring; urgency=low +netrunner-desktop-containment (4:4.9.3-0ubuntu1) raring; urgency=low * New upstream release (LP: #1074747) -- Philip Muškovac Tue, 06 Nov 2012 22:25:13 +0100 -kde-baseapps (4:4.9.2-0ubuntu4) quantal; urgency=low +netrunner-desktop-containment (4:4.9.2-0ubuntu4) quantal; urgency=low * Rebuild to get missing binaries that were lost due to being copied from proposed to release before they were built -- Scott Kitterman Fri, 05 Oct 2012 00:37:46 -0400 -kde-baseapps (4:4.9.2-0ubuntu3) quantal-proposed; urgency=low +netrunner-desktop-containment (4:4.9.2-0ubuntu3) quantal-proposed; urgency=low * Remove build-dep on kdelibs5-data now headers in correct -dev package -- Jonathan Riddell Wed, 03 Oct 2012 10:21:10 +0100 -kde-baseapps (4:4.9.2-0ubuntu2) quantal-proposed; urgency=low +netrunner-desktop-containment (4:4.9.2-0ubuntu2) quantal-proposed; urgency=low * Build depend on kdelibs5-data -- Rohan Garg Wed, 03 Oct 2012 00:24:05 +0100 -kde-baseapps (4:4.9.2-0ubuntu1) quantal-proposed; urgency=low +netrunner-desktop-containment (4:4.9.2-0ubuntu1) quantal-proposed; urgency=low * New upstream bugfix release -- Jonathan Riddell Tue, 02 Oct 2012 15:13:31 +0100 -kde-baseapps (4:4.9.1-0ubuntu1) quantal; urgency=low +netrunner-desktop-containment (4:4.9.1-0ubuntu1) quantal; urgency=low [ Harald Sitter ] * New upstream release @@ -208,27 +293,27 @@ -- Harald Sitter Mon, 10 Sep 2012 18:18:36 +0530 -kde-baseapps (4:4.9.0-0ubuntu2) quantal; urgency=low +netrunner-desktop-containment (4:4.9.0-0ubuntu2) quantal; urgency=low * Build-dep on kdelibs 4.9.0a, adjust .install files to new library version no -- Jonathan Riddell Thu, 02 Aug 2012 11:57:48 +0100 -kde-baseapps (4:4.9.0-0ubuntu1) quantal; urgency=low +netrunner-desktop-containment (4:4.9.0-0ubuntu1) quantal; urgency=low * Use direct build-depends versions rather than kde-sc-dev-latest * New upstream release -- Jonathan Riddell Thu, 26 Jul 2012 17:04:39 +0100 -kde-baseapps (4:4.8.90-0ubuntu1) quantal; urgency=low +netrunner-desktop-containment (4:4.8.90-0ubuntu1) quantal; urgency=low * New upstream beta release. -- Felix Geyer Mon, 11 Jun 2012 22:08:00 +0200 -kde-baseapps (4:4.8.80a-0ubuntu1) quantal; urgency=low +netrunner-desktop-containment (4:4.8.80a-0ubuntu1) quantal; urgency=low * Merge with debian git, remainging changes: - keep breaks/replaces @@ -236,7 +321,7 @@ - keep kubuntu patches - dolphin suggests and not recommends ruby - add kfind, konsole and kompare to dolphin suggests - * konq-plugins breaks/replaces kde-baseapps-data << 4:4.8.80 + * konq-plugins breaks/replaces netrunner-desktop-containment-data << 4:4.8.80 * Drop squence numbers from kubuntu patches @@ -246,7 +331,7 @@ -- Philip Muškovac Fri, 25 May 2012 17:26:17 +0200 -kde-baseapps (4:4.8.4-2) unstable; urgency=low +netrunner-desktop-containment (4:4.8.4-2) unstable; urgency=low [ Pino Toscano ] * Add breaks/replaces in konqueror against kdebase-data << 4.7.2. @@ -257,7 +342,7 @@ -- Lisandro Damián Nicanor Pérez Meyer Fri, 19 Oct 2012 18:04:13 -0300 -kde-baseapps (4:4.8.4-1) unstable; urgency=low +netrunner-desktop-containment (4:4.8.4-1) unstable; urgency=low * New upstream release. @@ -267,12 +352,12 @@ * Update installed files. [ Pino Toscano ] - * Move files of the konqueror documentation from kde-baseapps-data to + * Move files of the konqueror documentation from netrunner-desktop-containment-data to konqueror itself. -- Modestas Vainius Sat, 09 Jun 2012 22:18:08 +0300 -kde-baseapps (4:4.8.3-1) experimental; urgency=low +netrunner-desktop-containment (4:4.8.3-1) experimental; urgency=low * New upstream release: - fixes support for SOCKS proxy in konqueror. (Closes: #575885) @@ -288,7 +373,7 @@ -- Modestas Vainius Sun, 27 May 2012 03:09:23 +0300 -kde-baseapps (4:4.8.3-0ubuntu1) quantal; urgency=low +netrunner-desktop-containment (4:4.8.3-0ubuntu1) quantal; urgency=low * New upstream release - drop patches applied upstream: @@ -298,7 +383,7 @@ -- Philip Muškovac Sun, 13 May 2012 19:15:13 +0200 -kde-baseapps (4:4.8.3-0r1) raring; urgency=low +netrunner-desktop-containment (4:4.8.3-0r1) raring; urgency=low * New upstream release. @@ -312,7 +397,7 @@ -- Eshat Cakar Thu, 08 Mar 2012 18:30:33 +0100 -kde-baseapps (4:4.8.2-0ubuntu2) precise; urgency=low +netrunner-desktop-containment (4:4.8.2-0ubuntu2) precise; urgency=low * Cherry-pick fixes from the 4.8 branch: - Reduce-the-timeout-in-KItemListKeyboardSearchManager.patch @@ -321,57 +406,57 @@ -- Felix Geyer Tue, 10 Apr 2012 10:45:55 +0200 -kde-baseapps (4:4.8.2-0ubuntu1) precise; urgency=low +netrunner-desktop-containment (4:4.8.2-0ubuntu1) precise; urgency=low * New upstream release - add new symbol to libkonq5abi1.symbols -- Philip Muškovac Fri, 30 Mar 2012 23:14:40 +0200 -kde-baseapps (4:4.8.1-0ubuntu1) precise; urgency=low +netrunner-desktop-containment (4:4.8.1-0ubuntu1) precise; urgency=low * New upstream release - - update dolphin.install and kde-baseapps-data.install + - update dolphin.install and netrunner-desktop-containment-data.install * Don't hide kfind by default now that it's not installed by default anymore (LP: #942324) * Drop kubuntu_25_dolphin_keys.diff, now upstream -- Philip Muškovac Sat, 03 Mar 2012 18:21:52 +0100 -kde-baseapps (4:4.8.0-0ubuntu2) precise; urgency=low +netrunner-desktop-containment (4:4.8.0-0ubuntu2) precise; urgency=low * Add kubuntu_26_folderwidget_drawing.diff from upstream, fix rendering of box on folderwidget -- Jonathan Riddell Tue, 21 Feb 2012 13:38:52 +0000 -kde-baseapps (4:4.8.0-0ubuntu1) precise; urgency=low +netrunner-desktop-containment (4:4.8.0-0ubuntu1) precise; urgency=low * New upstream release * Add kubuntu_25_dolphin_keys.diff from branch -- Jonathan Riddell Thu, 19 Jan 2012 12:01:22 +0000 -kde-baseapps (4:4.7.97-0ubuntu1) precise; urgency=low +netrunner-desktop-containment (4:4.7.97-0ubuntu1) precise; urgency=low * New upstream release candidate -- Jonathan Riddell Wed, 04 Jan 2012 14:55:21 +0000 -kde-baseapps (4:4.7.95-0ubuntu1) precise; urgency=low +netrunner-desktop-containment (4:4.7.95-0ubuntu1) precise; urgency=low * New upstream release candidate -- Philip Muškovac Sat, 24 Dec 2011 14:47:46 +0100 -kde-baseapps (4:4.7.90-0ubuntu1) precise; urgency=low +netrunner-desktop-containment (4:4.7.90-0ubuntu1) precise; urgency=low * New upstream beta release * Remove kubuntu_25_folderview_rename.diff now upstream -- Jonathan Riddell Wed, 14 Dec 2011 14:39:37 +0000 -kde-baseapps (4:4.7.4-2) unstable; urgency=low +netrunner-desktop-containment (4:4.7.4-2) unstable; urgency=low * Team upload. Upload to unstable. @@ -382,7 +467,7 @@ -- Ana Beatriz Guerrero Lopez Tue, 06 Mar 2012 11:31:48 +0100 -kde-baseapps (4:4.7.4-1) experimental; urgency=low +netrunner-desktop-containment (4:4.7.4-1) experimental; urgency=low * New upstream release. @@ -400,7 +485,7 @@ -- Debian Qt/KDE Maintainers Sun, 18 Dec 2011 01:09:26 +0100 -kde-baseapps (4:4.7.3-0ubuntu2) precise; urgency=low +netrunner-desktop-containment (4:4.7.3-0ubuntu2) precise; urgency=low * Merge with Debian Unstable, remaining changes: - Keep bumped replace/conflicts versions where necessary @@ -412,7 +497,7 @@ -- Jonathan Riddell Wed, 23 Nov 2011 14:27:58 +0000 -kde-baseapps (4:4.7.2-1) experimental; urgency=low +netrunner-desktop-containment (4:4.7.2-1) experimental; urgency=low * New upstream release. @@ -422,10 +507,10 @@ * Rename source package from kdebase to kdebase-apps in order to match upstream naming. * Rename the following binary packages: - - kde-baseapps -> kdebase-apps - - kdebase-bin -> kde-baseapps-bin - - kdebase-data -> kde-baseapps-data - - kdebase-dbg -> kde-baseapps-dbg + - netrunner-desktop-containment -> kdebase-apps + - kdebase-bin -> netrunner-desktop-containment-bin + - kdebase-data -> netrunner-desktop-containment-data + - kdebase-dbg -> netrunner-desktop-containment-dbg * Add the following dummy packages: - kdebase-apps - kdebase-apps-bin @@ -446,7 +531,7 @@ -- Debian Qt/KDE Maintainers Sat, 03 Dec 2011 10:44:14 -0300 -kde-baseapps (4:4.7.2-0r2) raring; urgency=low +netrunner-desktop-containment (4:4.7.2-0r2) raring; urgency=low * New upstream release. @@ -456,10 +541,10 @@ * Rename source package from kdebase to kdebase-apps in order to match upstream naming. * Rename the following binary packages: - - kde-baseapps -> kdebase-apps - - kdebase-bin -> kde-baseapps-bin - - kdebase-data -> kde-baseapps-data - - kdebase-dbg -> kde-baseapps-dbg + - netrunner-desktop-containment -> kdebase-apps + - kdebase-bin -> netrunner-desktop-containment-bin + - kdebase-data -> netrunner-desktop-containment-data + - kdebase-dbg -> netrunner-desktop-containment-dbg * Add the following dummy packages: - kdebase-apps - kdebase-apps-bin @@ -486,13 +571,13 @@ -- Debian Qt/KDE Maintainers Mon, 18 Jul 2011 21:53:54 +0300 -kde-baseapps (4:4.7.3-0ubuntu1) precise; urgency=low +netrunner-desktop-containment (4:4.7.3-0ubuntu1) precise; urgency=low * New upstream release -- Jonathan Kolberg Sat, 29 Oct 2011 10:41:09 +0200 -kde-baseapps (4:4.7.2-0ubuntu1) oneiric-proposed; urgency=low +netrunner-desktop-containment (4:4.7.2-0ubuntu1) oneiric-proposed; urgency=low [ Philip Muškovac ] * New upstream release (LP: #872506) @@ -514,21 +599,21 @@ -- Philip Muškovac Wed, 12 Oct 2011 15:20:00 +0200 -kde-baseapps (4:4.7.1-0ubuntu3) oneiric; urgency=low +netrunner-desktop-containment (4:4.7.1-0ubuntu3) oneiric; urgency=low * Cherrypick 1a284bb79e547f0789f02b202fa309823e6198b5 from KDE git (where it made a brief appearance) as debian/patches/folderview_rename.diff -- Scott Kitterman Thu, 22 Sep 2011 14:21:02 -0400 -kde-baseapps (4:4.7.1-0ubuntu2) oneiric; urgency=low +netrunner-desktop-containment (4:4.7.1-0ubuntu2) oneiric; urgency=low * No-change rebuild so translations aren't stripped from .desktop files anymore. -- Felix Geyer Thu, 15 Sep 2011 23:14:09 +0200 -kde-baseapps (4:4.7.1-0ubuntu1) oneiric; urgency=low +netrunner-desktop-containment (4:4.7.1-0ubuntu1) oneiric; urgency=low [ Rohan Garg ] * New upstream release @@ -536,13 +621,13 @@ -- Scott Kitterman Wed, 07 Sep 2011 12:00:56 -0400 -kde-baseapps (4:4.7.0-0ubuntu2) oneiric; urgency=low +netrunner-desktop-containment (4:4.7.0-0ubuntu2) oneiric; urgency=low * Bump various breaks/replaces to catch 4.6.5 packages -- Philip Muškovac Thu, 28 Jul 2011 17:58:34 +0200 -kde-baseapps (4:4.7.0-0ubuntu1) oneiric; urgency=low +netrunner-desktop-containment (4:4.7.0-0ubuntu1) oneiric; urgency=low [ Philip Muškovac ] * New upstrem release @@ -550,25 +635,25 @@ can validate HTML [ Felix Geyer ] - * Fix dependency of arch-any packages to kde-baseapps-data. + * Fix dependency of arch-any packages to netrunner-desktop-containment-data. -- Philip Muškovac Fri, 22 Jul 2011 21:49:53 +0200 -kde-baseapps (4:4.6.90-0ubuntu3) oneiric; urgency=low +netrunner-desktop-containment (4:4.6.90-0ubuntu3) oneiric; urgency=low * Add transitional package for kdebase-bin since many packages still depend on it -- Philip Muškovac Wed, 13 Jul 2011 10:02:41 +0200 -kde-baseapps (4:4.6.90-0ubuntu2) oneiric; urgency=low +netrunner-desktop-containment (4:4.6.90-0ubuntu2) oneiric; urgency=low * debian/copyright: - add MIT section for kdepasswd/passwd.h -- Philip Muškovac Sat, 09 Jul 2011 02:04:40 +0200 -kde-baseapps (4:4.6.90-0ubuntu1) oneiric; urgency=low +netrunner-desktop-containment (4:4.6.90-0ubuntu1) oneiric; urgency=low * New upstream release - update packaging for renamed source. diff -Nru netrunner-desktop-containment-4.11.1/debian/control netrunner-desktop-containment-4.13.0/debian/control --- netrunner-desktop-containment-4.11.1/debian/control 2014-01-02 18:48:32.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/debian/control 2014-05-26 15:31:26.000000000 +0000 @@ -11,14 +11,14 @@ Lisandro Damián Nicanor Pérez Meyer Build-Depends: kde-sc-dev-latest (>= 4:4.10.1), cmake, debhelper (>= 7.3.16), pkg-kde-tools (>= 0.12), libdlrestrictions-dev (>= 0.14), - kdelibs5-dev (>= 4:4.11.1), libkactivities-dev (>= 4:4.11.1), - nepomuk-core-dev (>= 4:4.11.1), libnepomukwidgets-dev (>= 4:4.11.1), + kdelibs5-dev (>= 4:4.13.0), libkactivities-dev (>= 4:4.13.0), libphonon-dev (>= 4:4.3.0), libqimageblitz-dev (>= 1:0.0.4-2), libxkbfile-dev, libstreamanalyzer-dev (>= 0.6.3), libxrender-dev, zlib1g-dev, libxt-dev, pkg-config, libglib2.0-dev, shared-desktop-ontologies (>= 0.8), - libtidy-dev, libkonq5-dev + libtidy-dev, libkfilemetadata-dev (>= 4:4.13.0), + baloo-dev (>= 4:4.13.0), libbaloowidgets-dev (>= 4:4.13.0), libkonq5-dev Standards-Version: 3.9.3 Homepage: http://www.kde.org/ Vcs-Browser: http://bazaar.launchpad.net/~kubuntu-packagers/kubuntu-packaging/kde-baseapps diff -Nru netrunner-desktop-containment-4.11.1/debian/dolphin.install netrunner-desktop-containment-4.13.0/debian/dolphin.install --- netrunner-desktop-containment-4.11.1/debian/dolphin.install 2014-01-02 18:48:32.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/debian/dolphin.install 2014-05-26 15:31:26.000000000 +0000 @@ -20,6 +20,7 @@ usr/share/doc/kde/HTML/en/dolphin/locationbar-context-menu.png usr/share/doc/kde/HTML/en/dolphin/locationbar-editable.png usr/share/doc/kde/HTML/en/dolphin/locationbar-places-icon.png +usr/share/doc/kde/HTML/en/dolphin/locationbar-kioslaves-menu.png usr/share/doc/kde/HTML/en/dolphin/nepomuk-search-more-options.png usr/share/doc/kde/HTML/en/dolphin/nepomuk-search.png usr/share/doc/kde/HTML/en/dolphin/preferences-general-behavior.png diff -Nru netrunner-desktop-containment-4.11.1/debian/kde-baseapps-data.install netrunner-desktop-containment-4.13.0/debian/kde-baseapps-data.install --- netrunner-desktop-containment-4.11.1/debian/kde-baseapps-data.install 2014-01-02 18:48:32.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/debian/kde-baseapps-data.install 2014-05-26 15:31:26.000000000 +0000 @@ -32,7 +32,12 @@ usr/share/kde4/services/useragent.desktop usr/share/kde4/services/useragentstrings/android10.desktop usr/share/kde4/services/useragentstrings/chrome10onwinnt51.desktop +usr/share/kde4/services/useragentstrings/chrome22oncurrent.desktop +usr/share/kde4/services/useragentstrings/chrome23oncurrent.desktop +usr/share/kde4/services/useragentstrings/chrome24oncurrent.desktop usr/share/kde4/services/useragentstrings/chrome50oncurrent.desktop +usr/share/kde4/services/useragentstrings/firefox15oncurrent.desktop +usr/share/kde4/services/useragentstrings/firefox16oncurrent.desktop usr/share/kde4/services/useragentstrings/firefox20oncurrent.desktop usr/share/kde4/services/useragentstrings/firefox30oncurrent.desktop usr/share/kde4/services/useragentstrings/firefox36oncurrent.desktop @@ -43,12 +48,16 @@ usr/share/kde4/services/useragentstrings/ie60oncurrent.desktop usr/share/kde4/services/useragentstrings/ie60onwinnt51.desktop usr/share/kde4/services/useragentstrings/ie70onwinnt51.desktop +usr/share/kde4/services/useragentstrings/ie80onwinnt60.desktop +usr/share/kde4/services/useragentstrings/ie90onwinnt71.desktop usr/share/kde4/services/useragentstrings/lynxoncurrent.desktop usr/share/kde4/services/useragentstrings/nn301oncurrent.desktop usr/share/kde4/services/useragentstrings/nn475oncurrent.desktop usr/share/kde4/services/useragentstrings/nn475onwin95.desktop usr/share/kde4/services/useragentstrings/ns71oncurrent.desktop usr/share/kde4/services/useragentstrings/ns71onwinnt51.desktop +usr/share/kde4/services/useragentstrings/op1162oncurrent.desktop +usr/share/kde4/services/useragentstrings/op1202oncurrent.desktop usr/share/kde4/services/useragentstrings/op403onwinnt4.desktop usr/share/kde4/services/useragentstrings/op85oncurrent.desktop usr/share/kde4/services/useragentstrings/op90oncurrent.desktop @@ -57,6 +66,8 @@ usr/share/kde4/services/useragentstrings/safari30oniphone.desktop usr/share/kde4/services/useragentstrings/safari32.desktop usr/share/kde4/services/useragentstrings/safari40.desktop +usr/share/kde4/services/useragentstrings/safari517.desktop +usr/share/kde4/services/useragentstrings/safari60.desktop usr/share/kde4/services/useragentstrings/w3moncurrent.desktop usr/share/kde4/services/useragentstrings/wgetoncurrent.desktop usr/share/kde4/servicetypes/uasprovider.desktop diff -Nru netrunner-desktop-containment-4.11.1/doc/dolphin/index.docbook netrunner-desktop-containment-4.13.0/doc/dolphin/index.docbook --- netrunner-desktop-containment-4.11.1/doc/dolphin/index.docbook 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/doc/dolphin/index.docbook 2014-05-26 15:31:22.000000000 +0000 @@ -580,7 +580,7 @@ When in bread crumb mode, clicking in the gray area to the right of the path -with the &LMB; switches the location bar to the editable mode, +with the &LMB; switches the location bar to editable mode, in which the path can be edited using the keyboard. To switch back to bread crumb mode, click the check mark at the right of the location bar with the &LMB;. @@ -597,10 +597,39 @@ Location bar in editable mode. + + +Using Kioslaves + If the location bar is empty in editable mode, a drop down box appears in -front of the bar with all available kioslaves on your system. Using these ioslaves -you can ⪚ launch a &systemsettings; module or KFontview from &dolphin;. +front of the bar listing all available kioslaves on your system. Kioslaves are +programs built into &kde; which add support for many different protocols to +&dolphin; and other &kde; applications. + +For example with the fish kioslave &dolphin; can be +used to manage files and folders on a remote host that is accessible +via SSH. To do this you would type fish://username@remotehost +into the location bar. Similar remote file management can be done on +remote hosts accessible via the &FTP;, NFS, SFTP, SMB (CIFS) or webdav protocols. + +It is also possible to use the kioslaves drop down list to access +&systemsettings;, fonts, trash, other programs and devices attached to your computer. +See the drop down list for the full list of capabilities available from kioslaves on your system. + +Screenshot of the list of kioslaves + + + + + +Location bar showing list of available kioslaves. + +List of available kioslaves. + + + + @@ -747,6 +776,7 @@ Finding Files and Searching in Files + &dolphin; is capable of searching for files and for content in files. If &Ctrl;F is pressed or Edit @@ -1121,7 +1151,13 @@ (Single-click to open files and folders) or a double mouse click (Double-click to open files and folders). In the latter case, a single mouse click will select the file or folder. - + + +This is a system wide setting and can be changed in the &systemsettings; in the +Input Devices Mouse +module as well. + + Archives will be opened inside &dolphin;, and not in an external application, if Binary files /tmp/MrQpOAJQDi/netrunner-desktop-containment-4.11.1/doc/dolphin/locationbar-kioslaves-menu.png and /tmp/XC8hLjRn_P/netrunner-desktop-containment-4.13.0/doc/dolphin/locationbar-kioslaves-menu.png differ diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/CMakeLists.txt netrunner-desktop-containment-4.13.0/dolphin/src/CMakeLists.txt --- netrunner-desktop-containment-4.11.1/dolphin/src/CMakeLists.txt 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/CMakeLists.txt 2014-05-26 15:31:22.000000000 +0000 @@ -1,37 +1,36 @@ -macro_optional_find_package(NepomukCore) -set_package_properties(NepomukCore PROPERTIES DESCRIPTION "Nepomuk Core libraries" +macro_optional_find_package(Baloo) +set_package_properties(Baloo PROPERTIES DESCRIPTION "Baloo Core libraries" URL "http://www.kde.org" TYPE OPTIONAL - PURPOSE "For adding desktop-wide tagging support to dolphin" + PURPOSE "For adding desktop-wide search and tagging support to dolphin" ) -macro_optional_find_package(NepomukWidgets) -set_package_properties(NepomukWidgets PROPERTIES DESCRIPTION "Nepomuk Widgets" +macro_optional_find_package(BalooWidgets) +set_package_properties(BalooWidgets PROPERTIES DESCRIPTION "Baloos Widgets" URL "http://www.kde.org" TYPE OPTIONAL - PURPOSE "For adding desktop-wide tagging support to dolphin" ) -if(NepomukCore_FOUND AND NepomukWidgets_FOUND) - set(HAVE_NEPOMUK TRUE) +macro_optional_find_package(KFileMetaData) +set_package_properties(KFileMetaData PROPERTIES + URL "https://projects.kde.org/kfilemetadata" + TYPE OPTIONAL + PURPOSE "For accessing file metadata labels" + ) + +if (Baloo_FOUND AND BalooWidgets_FOUND AND KFileMetaData_FOUND) + set(HAVE_BALOO TRUE) endif() -configure_file(config-nepomuk.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-nepomuk.h ) +configure_file(config-baloo.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-baloo.h ) macro_bool_to_01(X11_Xrender_FOUND HAVE_XRENDER) configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h ) -include_directories( ${KACTIVITIES_INCLUDE_DIRS} ) - -if(HAVE_NEPOMUK) - find_package(Soprano 2.7.56) - set_package_properties(Soprano PROPERTIES DESCRIPTION "Qt-based RDF storage and parsing solution" - URL "http://soprano.sourceforge.net" - TYPE REQUIRED - PURPOSE "Required for everything (storage and general data management)" - ) +include_directories( ${KACTIVITIES_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} ) - include_directories( ${SOPRANO_INCLUDE_DIR} ${NEPOMUK_CORE_INCLUDE_DIR} ${NEPOMUK_WIDGETS_INCLUDE_DIR} ) +if(HAVE_BALOO) + include_directories(${BALOO_INCLUDE_DIR} ${BALOO_WIDGETS_INCLUDE_DIR} ${KFILEMETADATA_INCLUDE_DIR}) endif() add_subdirectory(tests) @@ -53,11 +52,14 @@ kitemviews/kitemlistviewaccessible.cpp kitemviews/kitemlistwidget.cpp kitemviews/kitemmodelbase.cpp + kitemviews/kitemset.cpp kitemviews/kstandarditem.cpp kitemviews/kstandarditemlistgroupheader.cpp kitemviews/kstandarditemlistwidget.cpp kitemviews/kstandarditemlistview.cpp kitemviews/kstandarditemmodel.cpp + kitemviews/private/kdirectorycontentscounter.cpp + kitemviews/private/kdirectorycontentscounterworker.cpp kitemviews/private/kfileitemclipboard.cpp kitemviews/private/kfileitemmodeldirlister.cpp kitemviews/private/kfileitemmodelfilter.cpp @@ -92,12 +94,13 @@ views/viewproperties.cpp views/zoomlevelinfo.cpp dolphinremoveaction.cpp + dolphinnewfilemenu.cpp ) -if(HAVE_NEPOMUK) +if(HAVE_BALOO) set(dolphinprivate_LIB_SRCS ${dolphinprivate_LIB_SRCS} - kitemviews/private/knepomukrolesprovider.cpp + kitemviews/private/kbaloorolesprovider.cpp ) endif() @@ -119,12 +122,12 @@ ${KDE4_KNEWSTUFF3_LIBS} ) -if(HAVE_NEPOMUK) +if(HAVE_BALOO) target_link_libraries( dolphinprivate - ${NEPOMUK_CORE_LIBRARY} - ${NEPOMUK_WIDGETS_LIBRARY} - ${SOPRANO_LIBRARIES} + ${BALOO_LIBRARIES} + ${BALOO_WIDGETS_LIBRARY} + ${KFILEMETADATA_LIBRARY} ) endif() @@ -166,7 +169,6 @@ dolphinapplication.cpp dolphindockwidget.cpp dolphinmainwindow.cpp - dolphinnewfilemenu.cpp dolphinviewcontainer.cpp dolphincontextmenu.cpp filterbar/filterbar.cpp @@ -190,7 +192,6 @@ panels/folders/folderspanel.cpp search/dolphinfacetswidget.cpp search/dolphinsearchbox.cpp - search/dolphinsearchinformation.cpp settings/general/behaviorsettingspage.cpp settings/general/configurepreviewplugindialog.cpp settings/general/confirmationssettingspage.cpp @@ -246,11 +247,10 @@ ${KDE4_PHONON_LIBS} ) -if(HAVE_NEPOMUK) +if(HAVE_BALOO) target_link_libraries(kdeinit_dolphin - ${NEPOMUK_CORE_LIBRARY} - ${NEPOMUK_WIDGETS_LIBRARY} - ${SOPRANO_LIBRARIES} + ${BALOO_LIBRARIES} + ${BALOO_WIDGETS_LIBRARY} ) endif() @@ -323,12 +323,6 @@ target_link_libraries(kcm_dolphinnavigation ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} dolphinprivate) target_link_libraries(kcm_dolphinservices ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} ${KDE4_KIO_LIBS} ${KDE4_KNEWSTUFF3_LIBRARY} dolphinprivate) target_link_libraries(kcm_dolphingeneral ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} ${KDE4_KIO_LIBS} dolphinprivate) -if(HAVE_NEPOMUK) - target_link_libraries(kcm_dolphinviewmodes ${NEPOMUK_CORE_LIBRARY} ${NEPOMUK_WIDGETS_LIBRARY}) - target_link_libraries(kcm_dolphinnavigation ${NEPOMUK_CORE_LIBRARY} ${NEPOMUK_WIDGETS_LIBRARY}) - target_link_libraries(kcm_dolphinservices ${NEPOMUK_CORE_LIBRARY} ${NEPOMUK_WIDGETS_LIBRARY}) - target_link_libraries(kcm_dolphingeneral ${NEPOMUK_CORE_LIBRARY} ${NEPOMUK_WIDGETS_LIBRARY}) -endif() install(TARGETS kcm_dolphinviewmodes DESTINATION ${PLUGIN_INSTALL_DIR} ) install(TARGETS kcm_dolphinnavigation DESTINATION ${PLUGIN_INSTALL_DIR} ) diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/config-baloo.h.cmake netrunner-desktop-containment-4.13.0/dolphin/src/config-baloo.h.cmake --- netrunner-desktop-containment-4.11.1/dolphin/src/config-baloo.h.cmake 1970-01-01 00:00:00.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/config-baloo.h.cmake 2014-05-26 15:31:22.000000000 +0000 @@ -0,0 +1 @@ +#cmakedefine HAVE_BALOO diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/config-nepomuk.h.cmake netrunner-desktop-containment-4.13.0/dolphin/src/config-nepomuk.h.cmake --- netrunner-desktop-containment-4.11.1/dolphin/src/config-nepomuk.h.cmake 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/config-nepomuk.h.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -#cmakedefine HAVE_NEPOMUK diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/dolphincontextmenu.cpp netrunner-desktop-containment-4.13.0/dolphin/src/dolphincontextmenu.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/dolphincontextmenu.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/dolphincontextmenu.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -196,7 +196,7 @@ if (m_selectedItems.count() == 1) { if (m_fileInfo.isDir()) { // setup 'Create New' menu - DolphinNewFileMenu* newFileMenu = new DolphinNewFileMenu(m_mainWindow); + DolphinNewFileMenu* newFileMenu = new DolphinNewFileMenu(m_mainWindow->actionCollection(), m_mainWindow); const DolphinView* view = m_mainWindow->activeViewContainer()->view(); newFileMenu->setViewShowsHiddenFiles(view->hiddenFilesShown()); newFileMenu->checkUpToDate(); diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/dolphindockwidget.cpp netrunner-desktop-containment-4.13.0/dolphin/src/dolphindockwidget.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/dolphindockwidget.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/dolphindockwidget.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -21,6 +21,14 @@ #include +namespace { + // Disable the 'Floatable' feature, i.e., the possibility to drag the + // dock widget out of the main window. This works around problems like + // https://bugs.kde.org/show_bug.cgi?id=288629 + // https://bugs.kde.org/show_bug.cgi?id=322299 + const QDockWidget::DockWidgetFeatures DefaultDockWidgetFeatures = QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetClosable; +} + // Empty titlebar for the dock widgets when "Lock Layout" has been activated. class DolphinDockTitleBar : public QWidget { @@ -45,6 +53,7 @@ m_locked(false), m_dockTitleBar(0) { + setFeatures(DefaultDockWidgetFeatures); } DolphinDockWidget::DolphinDockWidget(QWidget* parent, Qt::WindowFlags flags) : @@ -52,6 +61,7 @@ m_locked(false), m_dockTitleBar(0) { + setFeatures(DefaultDockWidgetFeatures); } DolphinDockWidget::~DolphinDockWidget() @@ -71,9 +81,7 @@ setFeatures(QDockWidget::NoDockWidgetFeatures); } else { setTitleBarWidget(0); - setFeatures(QDockWidget::DockWidgetMovable | - QDockWidget::DockWidgetFloatable | - QDockWidget::DockWidgetClosable); + setFeatures(DefaultDockWidgetFeatures); } } } diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/dolphinmainwindow.cpp netrunner-desktop-containment-4.13.0/dolphin/src/dolphinmainwindow.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/dolphinmainwindow.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/dolphinmainwindow.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -35,6 +35,7 @@ #include "views/dolphinremoteencoding.h" #include "views/draganddrophelper.h" #include "views/viewproperties.h" +#include "views/dolphinnewfilemenuobserver.h" #ifndef Q_OS_WIN #include "panels/terminal/terminalpanel.h" @@ -126,6 +127,9 @@ ViewTab& viewTab = m_viewTab[m_tabIndex]; viewTab.wasActive = true; // The first opened tab is automatically active + connect(&DolphinNewFileMenuObserver::instance(), SIGNAL(errorMessage(QString)), + this, SLOT(showErrorMessage(QString))); + KIO::FileUndoManager* undoManager = KIO::FileUndoManager::self(); undoManager->setUiInterface(new UndoUiInterface()); @@ -213,6 +217,7 @@ toggleSplitView(); } updateEditActions(); + updatePasteAction(); updateViewActions(); updateGoActions(); @@ -254,12 +259,12 @@ // Open each directory inside a new tab. If the "split view" option has been enabled, // always show two directories within one tab. - QList::const_iterator it = dirs.begin(); - while (it != dirs.end()) { + QList::const_iterator it = dirs.constBegin(); + while (it != dirs.constEnd()) { openNewTab(*it); ++it; - if (hasSplitView && (it != dirs.end())) { + if (hasSplitView && (it != dirs.constEnd())) { const int tabIndex = m_viewTab.count() - 1; m_viewTab[tabIndex].secondaryView->setUrl(*it); ++it; @@ -352,6 +357,7 @@ if (view) { view->setUrl(url); updateEditActions(); + updatePasteAction(); updateViewActions(); updateGoActions(); setUrlAsCaption(url); @@ -477,6 +483,8 @@ m_viewTab.append(viewTab); actionCollection()->action("close_tab")->setEnabled(true); + actionCollection()->action("activate_prev_tab")->setEnabled(true); + actionCollection()->action("activate_next_tab")->setEnabled(true); // Provide a split view, if the startup settings are set this way if (GeneralSettings::splitView()) { @@ -673,6 +681,13 @@ Q_ASSERT(cont); } + // The right view must be activated before the URL is set. Changing + // the URL in the right view will emit the right URL navigator's + // urlChanged(KUrl) signal, which is connected to the changeUrl(KUrl) + // slot. That slot will change the URL in the left view if it is still + // active. See https://bugs.kde.org/show_bug.cgi?id=330047. + setActiveViewContainer(cont); + cont->setUrl(secondaryUrl); const bool editable = group.readEntry(tabProperty("Secondary Editable", i), false); cont->urlNavigator()->setUrlEditable(editable); @@ -986,50 +1001,23 @@ void DolphinMainWindow::compareFiles() { - // The method is only invoked if exactly 2 files have - // been selected. The selected files may be: - // - both in the primary view - // - both in the secondary view - // - one in the primary view and the other in the secondary - // view - Q_ASSERT(m_viewTab[m_tabIndex].primaryView); - - KUrl urlA; - KUrl urlB; - - KFileItemList items = m_viewTab[m_tabIndex].primaryView->view()->selectedItems(); - - switch (items.count()) { - case 0: { - Q_ASSERT(m_viewTab[m_tabIndex].secondaryView); - items = m_viewTab[m_tabIndex].secondaryView->view()->selectedItems(); - Q_ASSERT(items.count() == 2); - urlA = items[0].url(); - urlB = items[1].url(); - break; + const DolphinViewContainer* primaryViewContainer = m_viewTab[m_tabIndex].primaryView; + Q_ASSERT(primaryViewContainer); + KFileItemList items = primaryViewContainer->view()->selectedItems(); + + const DolphinViewContainer* secondaryViewContainer = m_viewTab[m_tabIndex].secondaryView; + if (secondaryViewContainer) { + items.append(secondaryViewContainer->view()->selectedItems()); } - case 1: { - urlA = items[0].url(); - Q_ASSERT(m_viewTab[m_tabIndex].secondaryView); - items = m_viewTab[m_tabIndex].secondaryView->view()->selectedItems(); - Q_ASSERT(items.count() == 1); - urlB = items[0].url(); - break; + if (items.count() != 2) { + // The action is disabled in this case, but it could have been triggered + // via D-Bus, see https://bugs.kde.org/show_bug.cgi?id=325517 + return; } - case 2: { - urlA = items[0].url(); - urlB = items[1].url(); - break; - } - - default: { - // may not happen: compareFiles may only get invoked if 2 - // files are selected - Q_ASSERT(false); - } - } + KUrl urlA = items.at(0).url(); + KUrl urlB = items.at(1).url(); QString command("kompare -c \""); command.append(urlA.pathOrUrl()); @@ -1171,6 +1159,8 @@ if (m_viewTab.count() == 1) { m_tabBar->removeTab(0); actionCollection()->action("close_tab")->setEnabled(false); + actionCollection()->action("activate_prev_tab")->setEnabled(false); + actionCollection()->action("activate_next_tab")->setEnabled(false); } else { m_tabBar->blockSignals(false); } @@ -1431,6 +1421,19 @@ activeViewContainer()->showMessage(error, DolphinViewContainer::Error); } +void DolphinMainWindow::slotPlaceActivated(const KUrl& url) +{ + DolphinViewContainer* view = activeViewContainer(); + + if (view->url() == url) { + // We can end up here if the user clicked a device in the Places Panel + // which had been unmounted earlier, see https://bugs.kde.org/show_bug.cgi?id=161385. + reloadView(); + } else { + changeUrl(url); + } +} + void DolphinMainWindow::setActiveViewContainer(DolphinViewContainer* viewContainer) { Q_ASSERT(viewContainer); @@ -1454,6 +1457,7 @@ updateHistory(); updateEditActions(); + updatePasteAction(); updateViewActions(); updateGoActions(); @@ -1482,7 +1486,7 @@ void DolphinMainWindow::setupActions() { // setup 'File' menu - m_newFileMenu = new DolphinNewFileMenu(this); + m_newFileMenu = new DolphinNewFileMenu(actionCollection(), this); KMenu* menu = m_newFileMenu->menu(); menu->setTitle(i18nc("@title:menu Create new folder, file, link, etc.", "Create New")); menu->setIcon(KIcon("document-new")); @@ -1637,11 +1641,13 @@ KAction* activateNextTab = actionCollection()->addAction("activate_next_tab"); activateNextTab->setText(i18nc("@action:inmenu", "Activate Next Tab")); + activateNextTab->setEnabled(false); connect(activateNextTab, SIGNAL(triggered()), SLOT(activateNextTab())); activateNextTab->setShortcuts(QApplication::isRightToLeft() ? prevTabKeys : nextTabKeys); KAction* activatePrevTab = actionCollection()->addAction("activate_prev_tab"); activatePrevTab->setText(i18nc("@action:inmenu", "Activate Previous Tab")); + activatePrevTab->setEnabled(false); connect(activatePrevTab, SIGNAL(triggered()), SLOT(activatePrevTab())); activatePrevTab->setShortcuts(QApplication::isRightToLeft() ? nextTabKeys : prevTabKeys); @@ -1763,7 +1769,7 @@ addDockWidget(Qt::LeftDockWidgetArea, placesDock); connect(placesPanel, SIGNAL(placeActivated(KUrl)), - this, SLOT(changeUrl(KUrl))); + this, SLOT(slotPlaceActivated(KUrl))); connect(placesPanel, SIGNAL(placeMiddleClicked(KUrl)), this, SLOT(openNewTab(KUrl))); connect(placesPanel, SIGNAL(errorMessage(QString)), @@ -1814,7 +1820,6 @@ deleteWithTrashShortcut->setEnabled(capabilities.supportsDeleting() && !enableMoveToTrash); cutAction->setEnabled(capabilities.supportsMoving()); } - updatePasteAction(); } void DolphinMainWindow::updateViewActions() diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/dolphinmainwindow.h netrunner-desktop-containment-4.13.0/dolphin/src/dolphinmainwindow.h --- netrunner-desktop-containment-4.11.1/dolphin/src/dolphinmainwindow.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/dolphinmainwindow.h 2014-05-26 15:31:22.000000000 +0000 @@ -22,7 +22,7 @@ #ifndef DOLPHIN_MAINWINDOW_H #define DOLPHIN_MAINWINDOW_H -#include +#include #include #include @@ -466,6 +466,13 @@ */ void slotPanelErrorMessage(const QString& error); + /** + * Is called if the user clicked an item in the Places Panel. + * Reloads the view if \a url is the current URL already, and changes the + * current URL otherwise. + */ + void slotPlaceActivated(const KUrl& url); + private: /** * Activates the given view, which means that diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/dolphinnewfilemenu.cpp netrunner-desktop-containment-4.13.0/dolphin/src/dolphinnewfilemenu.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/dolphinnewfilemenu.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/dolphinnewfilemenu.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -20,17 +20,13 @@ #include "dolphinnewfilemenu.h" -#include "dolphinmainwindow.h" -#include "dolphinviewcontainer.h" #include "views/dolphinnewfilemenuobserver.h" -#include "views/dolphinview.h" #include #include -DolphinNewFileMenu::DolphinNewFileMenu(DolphinMainWindow* parent) : - KNewFileMenu(parent->actionCollection(), "create_new", parent), - m_mainWin(parent) +DolphinNewFileMenu::DolphinNewFileMenu(KActionCollection* collection, QObject* parent) : + KNewFileMenu(collection, "new_menu", parent) { DolphinNewFileMenuObserver::instance().attach(this); } @@ -43,8 +39,7 @@ void DolphinNewFileMenu::slotResult(KJob* job) { if (job->error()) { - DolphinViewContainer* container = m_mainWin->activeViewContainer(); - container->showMessage(job->errorString(), DolphinViewContainer::Error); + emit errorMessage(job->errorString()); } else { KNewFileMenu::slotResult(job); } diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/dolphinnewfilemenu.h netrunner-desktop-containment-4.13.0/dolphin/src/dolphinnewfilemenu.h --- netrunner-desktop-containment-4.11.1/dolphin/src/dolphinnewfilemenu.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/dolphinnewfilemenu.h 2014-05-26 15:31:22.000000000 +0000 @@ -23,7 +23,8 @@ #include -class DolphinMainWindow; +#include "libdolphin_export.h" + class KJob; /** @@ -34,20 +35,20 @@ * All errors are shown in the status bar of Dolphin * instead as modal error dialog with an OK button. */ -class DolphinNewFileMenu : public KNewFileMenu +class LIBDOLPHINPRIVATE_EXPORT DolphinNewFileMenu : public KNewFileMenu { Q_OBJECT public: - DolphinNewFileMenu(DolphinMainWindow* parent); + DolphinNewFileMenu(KActionCollection* collection, QObject* parent); virtual ~DolphinNewFileMenu(); +signals: + void errorMessage(const QString& error); + protected slots: /** @see KNewFileMenu::slotResult() */ virtual void slotResult(KJob* job); - -private: - DolphinMainWindow* m_mainWin; }; #endif diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/dolphinpart.cpp netrunner-desktop-containment-4.13.0/dolphin/src/dolphinpart.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/dolphinpart.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/dolphinpart.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -47,6 +46,7 @@ #include "dolphinpart_ext.h" #endif +#include "dolphinnewfilemenu.h" #include "views/dolphinview.h" #include "views/dolphinviewactionhandler.h" #include "views/dolphinnewfilemenuobserver.h" @@ -79,6 +79,9 @@ m_view->setTabsForFilesEnabled(true); setWidget(m_view); + connect(&DolphinNewFileMenuObserver::instance(), SIGNAL(errorMessage(QString)), + this, SLOT(slotErrorMessage(QString))); + connect(m_view, SIGNAL(directoryLoadingCompleted()), this, SIGNAL(completed())); connect(m_view, SIGNAL(directoryLoadingProgress(int)), this, SLOT(updateProgress(int))); connect(m_view, SIGNAL(errorMessage(QString)), this, SLOT(slotErrorMessage(QString))); @@ -160,16 +163,14 @@ DolphinPart::~DolphinPart() { - DolphinNewFileMenuObserver::instance().detach(m_newFileMenu); } void DolphinPart::createActions() { // Edit menu - m_newFileMenu = new KNewFileMenu(actionCollection(), "new_menu", this); + m_newFileMenu = new DolphinNewFileMenu(actionCollection(), this); m_newFileMenu->setParentWidget(widget()); - DolphinNewFileMenuObserver::instance().attach(m_newFileMenu); connect(m_newFileMenu->menu(), SIGNAL(aboutToShow()), this, SLOT(updateNewMenu())); @@ -572,7 +573,8 @@ void DolphinPart::updateStatusBar() { - emit ReadOnlyPart::setStatusBarText(m_view->statusBarText()); + const QString escapedText = Qt::convertFromPlainText(m_view->statusBarText()); + emit ReadOnlyPart::setStatusBarText(QString("%1").arg(escapedText)); } void DolphinPart::updateProgress(int percent) @@ -614,89 +616,4 @@ return KParts::ReadOnlyPart::eventFilter(obj, event); } -//// - -void DolphinPartBrowserExtension::restoreState(QDataStream &stream) -{ - KParts::BrowserExtension::restoreState(stream); - m_part->view()->restoreState(stream); -} - -void DolphinPartBrowserExtension::saveState(QDataStream &stream) -{ - KParts::BrowserExtension::saveState(stream); - m_part->view()->saveState(stream); -} - -void DolphinPartBrowserExtension::cut() -{ - m_part->view()->cutSelectedItems(); -} - -void DolphinPartBrowserExtension::copy() -{ - m_part->view()->copySelectedItems(); -} - -void DolphinPartBrowserExtension::paste() -{ - m_part->view()->paste(); -} - -void DolphinPartBrowserExtension::pasteTo(const KUrl&) -{ - m_part->view()->pasteIntoFolder(); -} - -void DolphinPartBrowserExtension::reparseConfiguration() -{ - m_part->view()->readSettings(); -} - -//// - -DolphinPartFileInfoExtension::DolphinPartFileInfoExtension(DolphinPart* part) - : KParts::FileInfoExtension(part) -{ -} - -DolphinPart* DolphinPartFileInfoExtension::part() const -{ - return static_cast(parent()); -} - -bool DolphinPartFileInfoExtension::hasSelection() const -{ - return part()->view()->selectedItemsCount() > 0; -} - -KParts::FileInfoExtension::QueryModes DolphinPartFileInfoExtension::supportedQueryModes() const -{ - return (KParts::FileInfoExtension::AllItems | KParts::FileInfoExtension::SelectedItems); -} - -KFileItemList DolphinPartFileInfoExtension::queryFor(KParts::FileInfoExtension::QueryMode mode) const -{ - KFileItemList list; - - if (mode == KParts::FileInfoExtension::None) - return list; - - if (!(supportedQueryModes() & mode)) - return list; - - switch (mode) { - case KParts::FileInfoExtension::SelectedItems: - if (hasSelection()) - return part()->view()->selectedItems(); - break; - case KParts::FileInfoExtension::AllItems: - return part()->view()->items(); - default: - break; - } - - return list; -} - #include "dolphinpart.moc" diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/dolphinpart.desktop netrunner-desktop-containment-4.13.0/dolphin/src/dolphinpart.desktop --- netrunner-desktop-containment-4.11.1/dolphin/src/dolphinpart.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/dolphinpart.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -196,6 +196,7 @@ [Desktop Action compact] Name=Compact Name[ar]=مضغوط +Name[bg]=Компактно Name[bs]=Sabij Name[ca]=Compacte Name[ca@valencia]=Compacte @@ -209,8 +210,10 @@ Name[fr]=Concis Name[ga]=Dlúth Name[gl]=Compacto +Name[he]=מרוכז Name[hu]=Kompakt Name[ia]=Compacte +Name[is]=Þjappað Name[it]=Compatta Name[kk]=Ықшамды Name[km]=តូច​ល្មម @@ -323,7 +326,7 @@ Name[tg]=Тафсилотҳо Name[th]=รายละเอียด Name[tr]=Ayrıntılar -Name[ug]=تەپسىلاتى +Name[ug]=تەپسىلاتلار Name[uk]=Подробиці Name[uz]=Tafsilotlar Name[uz@cyrillic]=Тафсилотлар diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/dolphinpart_ext.cpp netrunner-desktop-containment-4.13.0/dolphin/src/dolphinpart_ext.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/dolphinpart_ext.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/dolphinpart_ext.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -26,6 +26,92 @@ #include + +DolphinPartBrowserExtension::DolphinPartBrowserExtension(DolphinPart* part) + :KParts::BrowserExtension( part ) + ,m_part(part) +{ + +} + +void DolphinPartBrowserExtension::restoreState(QDataStream &stream) +{ + KParts::BrowserExtension::restoreState(stream); + m_part->view()->restoreState(stream); +} + +void DolphinPartBrowserExtension::saveState(QDataStream &stream) +{ + KParts::BrowserExtension::saveState(stream); + m_part->view()->saveState(stream); +} + +void DolphinPartBrowserExtension::cut() +{ + m_part->view()->cutSelectedItems(); +} + +void DolphinPartBrowserExtension::copy() +{ + m_part->view()->copySelectedItems(); +} + +void DolphinPartBrowserExtension::paste() +{ + m_part->view()->paste(); +} + +void DolphinPartBrowserExtension::pasteTo(const KUrl&) +{ + m_part->view()->pasteIntoFolder(); +} + +void DolphinPartBrowserExtension::reparseConfiguration() +{ + m_part->view()->readSettings(); +} + + +DolphinPartFileInfoExtension::DolphinPartFileInfoExtension(DolphinPart* part) + :KParts::FileInfoExtension(part) + ,m_part(part) +{ +} + +bool DolphinPartFileInfoExtension::hasSelection() const +{ + return m_part->view()->selectedItemsCount() > 0; +} + +KParts::FileInfoExtension::QueryModes DolphinPartFileInfoExtension::supportedQueryModes() const +{ + return (KParts::FileInfoExtension::AllItems | KParts::FileInfoExtension::SelectedItems); +} + +KFileItemList DolphinPartFileInfoExtension::queryFor(KParts::FileInfoExtension::QueryMode mode) const +{ + KFileItemList list; + + if (mode == KParts::FileInfoExtension::None) + return list; + + if (!(supportedQueryModes() & mode)) + return list; + + switch (mode) { + case KParts::FileInfoExtension::SelectedItems: + if (hasSelection()) + return m_part->view()->selectedItems(); + break; + case KParts::FileInfoExtension::AllItems: + return m_part->view()->items(); + default: + break; + } + + return list; +} + DolphinPartListingFilterExtension::DolphinPartListingFilterExtension(DolphinPart* part) : KParts::ListingFilterExtension(part) , m_part(part) diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/dolphinpart_ext.h netrunner-desktop-containment-4.13.0/dolphin/src/dolphinpart_ext.h --- netrunner-desktop-containment-4.11.1/dolphin/src/dolphinpart_ext.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/dolphinpart_ext.h 2014-05-26 15:31:22.000000000 +0000 @@ -20,11 +20,47 @@ #ifndef DOLPHINPART_EXT_H #define DOLPHINPART_EXT_H - +#include +#include #include class DolphinPart; +class DolphinPartBrowserExtension : public KParts::BrowserExtension +{ + Q_OBJECT +public: + DolphinPartBrowserExtension( DolphinPart* part ); + virtual void restoreState(QDataStream &stream); + virtual void saveState(QDataStream &stream); + +public Q_SLOTS: + void cut(); + void copy(); + void paste(); + void pasteTo(const KUrl&); + void reparseConfiguration(); + +private: + DolphinPart* m_part; +}; + +class DolphinPartFileInfoExtension : public KParts::FileInfoExtension +{ + Q_OBJECT + +public: + DolphinPartFileInfoExtension(DolphinPart* part); + + virtual QueryModes supportedQueryModes() const; + virtual bool hasSelection() const; + + virtual KFileItemList queryFor(QueryMode mode) const; + +private: + DolphinPart* m_part; +}; + class DolphinPartListingFilterExtension : public KParts::ListingFilterExtension { Q_OBJECT diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/dolphinpart.h netrunner-desktop-containment-4.13.0/dolphin/src/dolphinpart.h --- netrunner-desktop-containment-4.11.1/dolphin/src/dolphinpart.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/dolphinpart.h 2014-05-26 15:31:22.000000000 +0000 @@ -21,12 +21,10 @@ #define DOLPHINPART_H #include -#include -#include #include -class KNewFileMenu; +class DolphinNewFileMenu; class DolphinViewActionHandler; class QActionGroup; class KAction; @@ -244,7 +242,7 @@ DolphinViewActionHandler* m_actionHandler; DolphinRemoteEncoding* m_remoteEncoding; DolphinPartBrowserExtension* m_extension; - KNewFileMenu* m_newFileMenu; + DolphinNewFileMenu* m_newFileMenu; KAction* m_findFileAction; KAction* m_openTerminalAction; QString m_nameFilter; @@ -252,41 +250,4 @@ Q_DISABLE_COPY(DolphinPart) }; -class DolphinPartBrowserExtension : public KParts::BrowserExtension -{ - Q_OBJECT -public: - DolphinPartBrowserExtension( DolphinPart* part ) - : KParts::BrowserExtension( part ), m_part(part) {} - - virtual void restoreState(QDataStream &stream); - virtual void saveState(QDataStream &stream); - -public Q_SLOTS: - void cut(); - void copy(); - void paste(); - void pasteTo(const KUrl&); - void reparseConfiguration(); - -private: - DolphinPart* m_part; -}; - - -class DolphinPartFileInfoExtension : public KParts::FileInfoExtension -{ - Q_OBJECT - -public: - DolphinPartFileInfoExtension(DolphinPart* part); - - virtual QueryModes supportedQueryModes() const; - virtual bool hasSelection() const; - - virtual KFileItemList queryFor(QueryMode mode) const; -protected: - DolphinPart* part() const; -}; - #endif /* DOLPHINPART_H */ diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/dolphinui.rc netrunner-desktop-containment-4.13.0/dolphin/src/dolphinui.rc --- netrunner-desktop-containment-4.11.1/dolphin/src/dolphinui.rc 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/dolphinui.rc 2014-05-26 15:31:22.000000000 +0000 @@ -2,7 +2,7 @@ - + diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/dolphinviewcontainer.cpp netrunner-desktop-containment-4.13.0/dolphin/src/dolphinviewcontainer.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/dolphinviewcontainer.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/dolphinviewcontainer.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -314,36 +314,18 @@ m_urlNavigator->setVisible(!enabled); if (enabled) { - KUrl url = m_urlNavigator->locationUrl(); - m_searchBox->setText(QString()); - m_searchBox->setReadOnly(isSearchUrl(url), url); - - // Remember the most recent non-search URL as search path - // of the search-box, so that it can be restored - // when switching back to the URL navigator. - int index = m_urlNavigator->historyIndex(); - const int historySize = m_urlNavigator->historySize(); - while (isSearchUrl(url) && (index < historySize)) { - ++index; - url = m_urlNavigator->locationUrl(index); - } - - if (!isSearchUrl(url)) { - m_searchBox->setSearchPath(url); - } + const KUrl& locationUrl = m_urlNavigator->locationUrl(); + m_searchBox->fromSearchUrl(locationUrl); } else { m_view->setViewPropertiesContext(QString()); // Restore the URL for the URL navigator. If Dolphin has been // started with a search-URL, the home URL is used as fallback. - const KUrl url = m_searchBox->searchPath(); - if (url.isValid() && !url.isEmpty()) { - if (isSearchUrl(url)) { - m_urlNavigator->goHome(); - } else { - m_urlNavigator->setLocationUrl(url); - } + KUrl url = m_searchBox->searchPath(); + if (url.isEmpty() || !url.isValid() || isSearchUrl(url)) { + url = GeneralSettings::self()->homeUrl(); } + m_urlNavigator->setLocationUrl(url); } } @@ -455,7 +437,7 @@ } if (isSearchUrl(url()) && m_view->itemsCount() == 0) { - // The dir lister has been completed on a Nepomuk-URI and no items have been found. Instead + // The dir lister has been completed on a Baloo-URI and no items have been found. Instead // of showing the default status bar information ("0 items") a more helpful information is given: m_statusBar->setText(i18nc("@info:status", "No items found.")); } else { @@ -508,8 +490,7 @@ if (item.isNull()) { m_statusBar->resetToDefaultText(); } else { - const QString text = item.isDir() ? item.text() : item.getStatusBarInfo(); - m_statusBar->setText(text); + m_statusBar->setText(item.getStatusBarInfo()); } } @@ -709,7 +690,7 @@ bool DolphinViewContainer::isSearchUrl(const KUrl& url) const { const QString protocol = url.protocol(); - return protocol.contains("search") || (protocol == QLatin1String("nepomuk")); + return protocol.contains("search"); } void DolphinViewContainer::saveViewState() diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/dolphinviewcontainer.h netrunner-desktop-containment-4.13.0/dolphin/src/dolphinviewcontainer.h --- netrunner-desktop-containment-4.11.1/dolphin/src/dolphinviewcontainer.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/dolphinviewcontainer.h 2014-05-26 15:31:22.000000000 +0000 @@ -317,7 +317,7 @@ private: /** - * @return True if the URL protocol is a search URL (e. g. nepomuksearch:// or filenamesearch://). + * @return True if the URL protocol is a search URL (e. g. baloosearch:// or filenamesearch://). */ bool isSearchUrl(const KUrl& url) const; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kfileitemlistview.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kfileitemlistview.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kfileitemlistview.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kfileitemlistview.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -119,7 +119,7 @@ return m_modelRolesUpdater ? m_modelRolesUpdater->enabledPlugins() : QStringList(); } -QPixmap KFileItemListView::createDragPixmap(const QSet& indexes) const +QPixmap KFileItemListView::createDragPixmap(const KItemSet& indexes) const { if (!model()) { return QPixmap(); @@ -165,10 +165,8 @@ QPainter painter(&dragPixmap); int x = 0; int y = 0; - QSetIterator it(indexes); - while (it.hasNext()) { - const int index = it.next(); + foreach (int index, indexes) { QPixmap pixmap = model()->data(index).value("iconPixmap").value(); if (pixmap.isNull()) { KIcon icon(model()->data(index).value("iconName").toString()); @@ -221,12 +219,6 @@ void KFileItemListView::onItemLayoutChanged(ItemLayout current, ItemLayout previous) { - if (previous == DetailsLayout || current == DetailsLayout) { - // The details-layout requires some invisible roles that - // must be added to the model if the new layout is "details". - // If the old layout was "details" the roles will get removed. - applyRolesToModel(); - } KStandardItemListView::onItemLayoutChanged(current, previous); triggerVisibleIndexRangeUpdate(); } diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kfileitemlistview.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kfileitemlistview.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kfileitemlistview.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kfileitemlistview.h 2014-05-26 15:31:22.000000000 +0000 @@ -73,7 +73,7 @@ QStringList enabledPlugins() const; /** @reimp */ - virtual QPixmap createDragPixmap(const QSet& indexes) const; + virtual QPixmap createDragPixmap(const KItemSet& indexes) const; protected: virtual KItemListWidgetCreatorBase* defaultWidgetCreator() const; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kfileitemlistwidget.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kfileitemlistwidget.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kfileitemlistwidget.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kfileitemlistwidget.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -18,6 +18,8 @@ ***************************************************************************/ #include "kfileitemlistwidget.h" +#include "kfileitemmodel.h" +#include "kitemlistview.h" #include #include @@ -35,6 +37,24 @@ { } +QString KFileItemListWidgetInformant::itemText(int index, const KItemListView* view) const +{ + Q_ASSERT(qobject_cast(view->model())); + KFileItemModel* fileItemModel = static_cast(view->model()); + + const KFileItem item = fileItemModel->fileItem(index); + return item.text(); +} + +bool KFileItemListWidgetInformant::itemIsLink(int index, const KItemListView* view) const +{ + Q_ASSERT(qobject_cast(view->model())); + KFileItemModel* fileItemModel = static_cast(view->model()); + + const KFileItem item = fileItemModel->fileItem(index); + return item.isLink(); +} + QString KFileItemListWidgetInformant::roleText(const QByteArray& role, const QHash& values) const { @@ -70,6 +90,15 @@ return text; } +QFont KFileItemListWidgetInformant::customizedFontForLinks(const QFont& baseFont) const +{ + // The customized font should be italic if the file is a symbolic link. + QFont font(baseFont); + font.setItalic(true); + return font; +} + + KFileItemListWidget::KFileItemListWidget(KItemListWidgetInformant* informant, QGraphicsItem* parent) : KStandardItemListWidget(informant, parent) { diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kfileitemlistwidget.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kfileitemlistwidget.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kfileitemlistwidget.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kfileitemlistwidget.h 2014-05-26 15:31:22.000000000 +0000 @@ -31,7 +31,10 @@ virtual ~KFileItemListWidgetInformant(); protected: + virtual QString itemText(int index, const KItemListView* view) const; + virtual bool itemIsLink(int index, const KItemListView* view) const; virtual QString roleText(const QByteArray& role, const QHash& values) const; + virtual QFont customizedFontForLinks(const QFont& baseFont) const; }; class LIBDOLPHINPRIVATE_EXPORT KFileItemListWidget : public KStandardItemListWidget diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kfileitemmodel.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kfileitemmodel.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kfileitemmodel.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kfileitemmodel.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -21,7 +21,6 @@ #include "kfileitemmodel.h" -#include #include #include #include @@ -76,7 +75,6 @@ connect(m_dirLister, SIGNAL(itemsDeleted(KFileItemList)), this, SLOT(slotItemsDeleted(KFileItemList))); connect(m_dirLister, SIGNAL(refreshItems(QList >)), this, SLOT(slotRefreshItems(QList >))); connect(m_dirLister, SIGNAL(clear()), this, SLOT(slotClear())); - connect(m_dirLister, SIGNAL(clear(KUrl)), this, SLOT(slotClear(KUrl))); connect(m_dirLister, SIGNAL(infoMessage(QString)), this, SIGNAL(infoMessage(QString))); connect(m_dirLister, SIGNAL(errorMessage(QString)), this, SIGNAL(errorMessage(QString))); connect(m_dirLister, SIGNAL(redirection(KUrl,KUrl)), this, SIGNAL(directoryRedirection(KUrl,KUrl))); @@ -152,7 +150,12 @@ QHash KFileItemModel::data(int index) const { if (index >= 0 && index < count()) { - return m_itemData.at(index)->values; + ItemData* data = m_itemData.at(index); + if (data->values.isEmpty()) { + data->values = retrieveData(data->item, data->parent); + } + + return data->values; } return QHash(); } @@ -163,7 +166,7 @@ return false; } - QHash currentValues = m_itemData.at(index)->values; + QHash currentValues = data(index); // Determine which roles have been changed QSet changedRoles; @@ -213,7 +216,7 @@ m_dirLister->setShowingDotFiles(show); m_dirLister->emitChanges(); if (show) { - slotCompleted(); + dispatchPendingItemsToInsert(); } } @@ -232,7 +235,7 @@ return m_dirLister->dirOnlyMode(); } -QMimeData* KFileItemModel::createMimeData(const QSet& indexes) const +QMimeData* KFileItemModel::createMimeData(const KItemSet& indexes) const { QMimeData* data = new QMimeData(); @@ -242,11 +245,23 @@ KUrl::List urls; KUrl::List mostLocalUrls; bool canUseMostLocalUrls = true; + const ItemData* lastAddedItem = 0; - QSetIterator it(indexes); - while (it.hasNext()) { - const int index = it.next(); - const KFileItem item = fileItem(index); + foreach (int index, indexes) { + const ItemData* itemData = m_itemData.at(index); + const ItemData* parent = itemData->parent; + + while (parent && parent != lastAddedItem) { + parent = parent->parent; + } + + if (parent && parent == lastAddedItem) { + // A parent of 'itemData' has been added already. + continue; + } + + lastAddedItem = itemData; + const KFileItem& item = itemData->item; if (!item.isNull()) { urls << item.targetUrl(); @@ -259,9 +274,7 @@ } const bool different = canUseMostLocalUrls && mostLocalUrls != urls; - urls = KDirModel::simplifiedUrlList(urls); // TODO: Check if we still need KDirModel for this in KDE 5.0 if (different) { - mostLocalUrls = KDirModel::simplifiedUrlList(mostLocalUrls); urls.populateMimeData(mostLocalUrls, data); } else { urls.populateMimeData(data); @@ -274,12 +287,12 @@ { startFromIndex = qMax(0, startFromIndex); for (int i = startFromIndex; i < count(); ++i) { - if (data(i)["text"].toString().startsWith(text, Qt::CaseInsensitive)) { + if (fileItem(i).text().startsWith(text, Qt::CaseInsensitive)) { return i; } } for (int i = 0; i < startFromIndex; ++i) { - if (data(i)["text"].toString().startsWith(text, Qt::CaseInsensitive)) { + if (fileItem(i).text().startsWith(text, Qt::CaseInsensitive)) { return i; } } @@ -341,27 +354,50 @@ KFileItem KFileItemModel::fileItem(const KUrl& url) const { - const int index = m_items.value(url, -1); - if (index >= 0) { - return m_itemData.at(index)->item; + const int indexForUrl = index(url); + if (indexForUrl >= 0) { + return m_itemData.at(indexForUrl)->item; } return KFileItem(); } int KFileItemModel::index(const KFileItem& item) const { - if (item.isNull()) { - return -1; - } - - return m_items.value(item.url(), -1); + return index(item.url()); } int KFileItemModel::index(const KUrl& url) const { KUrl urlToFind = url; urlToFind.adjustPath(KUrl::RemoveTrailingSlash); - return m_items.value(urlToFind, -1); + + const int itemCount = m_itemData.count(); + int itemsInHash = m_items.count(); + + int index = m_items.value(urlToFind, -1); + while (index < 0 && itemsInHash < itemCount) { + // Not all URLs are stored yet in m_items. We grow m_items until either + // urlToFind is found, or all URLs have been stored in m_items. + // Note that we do not add the URLs to m_items one by one, but in + // larger blocks. After each block, we check if urlToFind is in + // m_items. We could in principle compare urlToFind with each URL while + // we are going through m_itemData, but comparing two QUrls will, + // unlike calling qHash for the URLs, trigger a parsing of the URLs + // which costs both CPU cycles and memory. + const int blockSize = 1000; + const int currentBlockEnd = qMin(itemsInHash + blockSize, itemCount); + for (int i = itemsInHash; i < currentBlockEnd; ++i) { + const KUrl nextUrl = m_itemData.at(i)->item.url(); + m_items.insert(nextUrl, i); + } + + itemsInHash = currentBlockEnd; + index = m_items.value(urlToFind, -1); + } + + Q_ASSERT(index >= 0 || m_items.count() == m_itemData.count()); + + return index; } KFileItem KFileItemModel::rootItem() const @@ -410,6 +446,15 @@ kWarning() << "TODO: Emitting itemsChanged() with no information what has changed!"; emit itemsChanged(KItemRangeList() << KItemRange(0, count()), QSet()); } + + // Clear the 'values' of all filtered items. They will be re-populated with the + // correct roles the next time 'values' will be accessed via data(int). + QHash::iterator filteredIt = m_filteredItems.begin(); + const QHash::iterator filteredEnd = m_filteredItems.end(); + while (filteredIt != filteredEnd) { + (*filteredIt)->values.clear(); + ++filteredIt; + } } QSet KFileItemModel::roles() const @@ -435,15 +480,51 @@ if (expanded) { m_expandedDirs.insert(targetUrl, url); m_dirLister->openUrl(url, KDirLister::Keep); + + const KUrl::List previouslyExpandedChildren = m_itemData.at(index)->values.value("previouslyExpandedChildren").value(); + foreach (const KUrl& url, previouslyExpandedChildren) { + m_urlsToExpand.insert(url); + } } else { + // Note that there might be (indirect) children of the folder which is to be collapsed in + // m_pendingItemsToInsert. To prevent that they will be inserted into the model later, + // possibly without a parent, which might result in a crash, we insert all pending items + // right now. All new items which would be without a parent will then be removed. + dispatchPendingItemsToInsert(); + + // Check if the index of the collapsed folder has changed. If that is the case, then items + // were inserted before the collapsed folder, and its index needs to be updated. + if (m_itemData.at(index)->item != item) { + index = this->index(item); + } + m_expandedDirs.remove(targetUrl); m_dirLister->stop(url); - removeFilteredChildren(KFileItemList() << item); + const int parentLevel = expandedParentsCount(index); + const int itemCount = m_itemData.count(); + const int firstChildIndex = index + 1; + + KUrl::List expandedChildren; + + int childIndex = firstChildIndex; + while (childIndex < itemCount && expandedParentsCount(childIndex) > parentLevel) { + ItemData* itemData = m_itemData.at(childIndex); + if (itemData->values.value("isExpanded").toBool()) { + const KUrl targetUrl = itemData->item.targetUrl(); + const KUrl url = itemData->item.url(); + m_expandedDirs.remove(targetUrl); + m_dirLister->stop(url); // TODO: try to unit-test this, see https://bugs.kde.org/show_bug.cgi?id=332102#c11 + expandedChildren.append(targetUrl); + } + ++childIndex; + } + const int childrenCount = childIndex - firstChildIndex; - const KFileItemList itemsToRemove = childItems(item); - removeFilteredChildren(itemsToRemove); - removeItems(itemsToRemove, DeleteItemData); + removeFilteredChildren(KItemRangeList() << KItemRange(index, 1 + childrenCount)); + removeItems(KItemRangeList() << KItemRange(firstChildIndex, childrenCount), DeleteItemData); + + m_itemData.at(index)->values.insert("previouslyExpandedChildren", expandedChildren); } return true; @@ -460,7 +541,9 @@ bool KFileItemModel::isExpandable(int index) const { if (index >= 0 && index < count()) { - return m_itemData.at(index)->values.value("isExpandable").toBool(); + // Call data (instead of accessing m_itemData directly) + // to ensure that the value is initialized. + return data(index).value("isExpandable").toBool(); } return false; } @@ -468,10 +551,7 @@ int KFileItemModel::expandedParentsCount(int index) const { if (index >= 0 && index < count()) { - const int parentsCount = m_itemData.at(index)->values.value("expandedParentsCount").toInt(); - if (parentsCount > 0) { - return parentsCount; - } + return expandedParentsCount(m_itemData.at(index)); } return 0; } @@ -547,21 +627,25 @@ { // Check which shown items from m_itemData must get // hidden and hence moved to m_filteredItems. - KFileItemList newFilteredItems; + QVector newFilteredIndexes; + + const int itemCount = m_itemData.count(); + for (int index = 0; index < itemCount; ++index) { + ItemData* itemData = m_itemData.at(index); - foreach (ItemData* itemData, m_itemData) { // Only filter non-expanded items as child items may never // exist without a parent item if (!itemData->values.value("isExpanded").toBool()) { const KFileItem item = itemData->item; if (!m_filter.matches(item)) { - newFilteredItems.append(item); + newFilteredIndexes.append(index); m_filteredItems.insert(item, itemData); } } } - removeItems(newFilteredItems, KeepItemData); + const KItemRangeList removedRanges = KItemRangeList::fromSortedContainer(newFilteredIndexes); + removeItems(removedRanges, KeepItemData); // Check which hidden items from m_filteredItems should // get visible again and hence removed from m_filteredItems. @@ -580,22 +664,24 @@ insertItems(newVisibleItems); } -void KFileItemModel::removeFilteredChildren(const KFileItemList& parentsList) +void KFileItemModel::removeFilteredChildren(const KItemRangeList& itemRanges) { - if (m_filteredItems.isEmpty()) { + if (m_filteredItems.isEmpty() || !m_requestRole[ExpandedParentsCountRole]) { + // There are either no filtered items, or it is not possible to expand + // folders -> there cannot be any filtered children. return; } - // First, we put the parent items into a set to provide fast lookup - // while iterating over m_filteredItems and prevent quadratic - // complexity if there are N parents and N filtered items. - const QSet parents = parentsList.toSet(); + QSet parents; + foreach (const KItemRange& range, itemRanges) { + for (int index = range.index; index < range.index + range.count; ++index) { + parents.insert(m_itemData.at(index)); + } + } QHash::iterator it = m_filteredItems.begin(); while (it != m_filteredItems.end()) { - const ItemData* parent = it.value()->parent; - - if (parent && parents.contains(parent->item)) { + if (parents.contains(it.value()->parent)) { delete it.value(); it = m_filteredItems.erase(it); } else { @@ -623,7 +709,7 @@ // menus tries to put the actions into sub menus otherwise. info.group = QString(); } - info.requiresNepomuk = map[i].requiresNepomuk; + info.requiresBaloo = map[i].requiresBaloo; info.requiresIndexer = map[i].requiresIndexer; rolesInfo.append(info); } @@ -685,8 +771,8 @@ oldUrls.append(itemData->item.url()); } - m_groups.clear(); m_items.clear(); + m_items.reserve(itemCount); // Resort the items sort(m_itemData.begin(), m_itemData.end()); @@ -694,21 +780,46 @@ m_items.insert(m_itemData.at(i)->item.url(), i); } - // Determine the indexes that have been moved - QList movedToIndexes; - movedToIndexes.reserve(itemCount); - for (int i = 0; i < itemCount; i++) { - const int newIndex = m_items.value(oldUrls.at(i)); - movedToIndexes.append(newIndex); + // Determine the first index that has been moved. + int firstMovedIndex = 0; + while (firstMovedIndex < itemCount + && firstMovedIndex == m_items.value(oldUrls.at(firstMovedIndex))) { + ++firstMovedIndex; + } + + const bool itemsHaveMoved = firstMovedIndex < itemCount; + if (itemsHaveMoved) { + m_groups.clear(); + + int lastMovedIndex = itemCount - 1; + while (lastMovedIndex > firstMovedIndex + && lastMovedIndex == m_items.value(oldUrls.at(lastMovedIndex))) { + --lastMovedIndex; + } + + Q_ASSERT(firstMovedIndex <= lastMovedIndex); + + // Create a list movedToIndexes, which has the property that + // movedToIndexes[i] is the new index of the item with the old index + // firstMovedIndex + i. + const int movedItemsCount = lastMovedIndex - firstMovedIndex + 1; + QList movedToIndexes; + movedToIndexes.reserve(movedItemsCount); + for (int i = firstMovedIndex; i <= lastMovedIndex; ++i) { + const int newIndex = m_items.value(oldUrls.at(i)); + movedToIndexes.append(newIndex); + } + + emit itemsMoved(KItemRange(firstMovedIndex, movedItemsCount), movedToIndexes); + } else if (groupedSorting()) { + // The groups might have changed even if the order of the items has not. + const QList > oldGroups = m_groups; + m_groups.clear(); + if (groups() != oldGroups) { + emit groupsChanged(); + } } - // Don't check whether items have really been moved and always emit a - // itemsMoved() signal after resorting: In case of grouped items - // the groups might change even if the items themselves don't change their - // position. Let the receiver of the signal decide whether a check for moved - // items makes sense. - emit itemsMoved(KItemRange(0, itemCount), movedToIndexes); - #ifdef KFILEITEMMODEL_DEBUG kDebug() << "[TIME] Resorting of" << itemCount << "items:" << timer.elapsed(); #endif @@ -724,10 +835,10 @@ // Therefore, some URLs in m_restoredExpandedUrls might not be visible yet // -> we expand the first visible URL we find in m_restoredExpandedUrls. foreach (const KUrl& url, m_urlsToExpand) { - const int index = m_items.value(url, -1); - if (index >= 0) { + const int indexForUrl = index(url); + if (indexForUrl >= 0) { m_urlsToExpand.remove(url); - if (setExpanded(index, true)) { + if (setExpanded(indexForUrl, true)) { // The dir lister has been triggered. This slot will be called // again after the directory has been expanded. return; @@ -764,15 +875,12 @@ } if (m_requestRole[ExpandedParentsCountRole]) { - KFileItem item = items.first(); - // If the expanding of items is enabled, the call // dirLister->openUrl(url, KDirLister::Keep) in KFileItemModel::setExpanded() // might result in emitting the same items twice due to the Keep-parameter. // This case happens if an item gets expanded, collapsed and expanded again // before the items could be loaded for the first expansion. - const int index = m_items.value(item.url(), -1); - if (index >= 0) { + if (index(items.first().url()) >= 0) { // The items are already part of the model. return; } @@ -786,7 +894,7 @@ // KDirLister keeps the children of items that got expanded once even if // they got collapsed again with KFileItemModel::setExpanded(false). So it must be // checked whether the parent for new items is still expanded. - const int parentIndex = m_items.value(parentUrl, -1); + const int parentIndex = index(parentUrl); if (parentIndex >= 0 && !m_itemData[parentIndex]->values.value("isExpanded").toBool()) { // The parent is not expanded. return; @@ -821,29 +929,48 @@ { dispatchPendingItemsToInsert(); - KFileItemList itemsToRemove = items; - if (m_requestRole[ExpandedParentsCountRole]) { - // Assure that removing a parent item also results in removing all children - foreach (const KFileItem& item, items) { - itemsToRemove.append(childItems(item)); - } - } + QVector indexesToRemove; + indexesToRemove.reserve(items.count()); - if (!m_filteredItems.isEmpty()) { - foreach (const KFileItem& item, itemsToRemove) { + foreach (const KFileItem& item, items) { + const int indexForItem = index(item); + if (indexForItem >= 0) { + indexesToRemove.append(indexForItem); + } else { + // Probably the item has been filtered. QHash::iterator it = m_filteredItems.find(item); if (it != m_filteredItems.end()) { delete it.value(); m_filteredItems.erase(it); } } + } + + std::sort(indexesToRemove.begin(), indexesToRemove.end()); - if (m_requestRole[ExpandedParentsCountRole]) { - removeFilteredChildren(itemsToRemove); + if (m_requestRole[ExpandedParentsCountRole] && !m_expandedDirs.isEmpty()) { + // Assure that removing a parent item also results in removing all children + QVector indexesToRemoveWithChildren; + indexesToRemoveWithChildren.reserve(m_itemData.count()); + + const int itemCount = m_itemData.count(); + foreach (int index, indexesToRemove) { + indexesToRemoveWithChildren.append(index); + + const int parentLevel = expandedParentsCount(index); + int childIndex = index + 1; + while (childIndex < itemCount && expandedParentsCount(childIndex) > parentLevel) { + indexesToRemoveWithChildren.append(childIndex); + ++childIndex; + } } + + indexesToRemove = indexesToRemoveWithChildren; } - removeItems(itemsToRemove, DeleteItemData); + const KItemRangeList itemRanges = KItemRangeList::fromSortedContainer(indexesToRemove); + removeFilteredChildren(itemRanges); + removeItems(itemRanges, DeleteItemData); } void KFileItemModel::slotRefreshItems(const QList >& items) @@ -864,14 +991,14 @@ const QPair& itemPair = it.next(); const KFileItem& oldItem = itemPair.first; const KFileItem& newItem = itemPair.second; - const int index = m_items.value(oldItem.url(), -1); - if (index >= 0) { - m_itemData[index]->item = newItem; + const int indexForItem = index(oldItem); + if (indexForItem >= 0) { + m_itemData[indexForItem]->item = newItem; // Keep old values as long as possible if they could not retrieved synchronously yet. // The update of the values will be done asynchronously by KFileItemModelRolesUpdater. - QHashIterator it(retrieveData(newItem, m_itemData.at(index)->parent)); - QHash& values = m_itemData[index]->values; + QHashIterator it(retrieveData(newItem, m_itemData.at(indexForItem)->parent)); + QHash& values = m_itemData[indexForItem]->values; while (it.hasNext()) { it.next(); const QByteArray& role = it.key(); @@ -882,8 +1009,22 @@ } m_items.remove(oldItem.url()); - m_items.insert(newItem.url(), index); - indexes.append(index); + m_items.insert(newItem.url(), indexForItem); + indexes.append(indexForItem); + } else { + // Check if 'oldItem' is one of the filtered items. + QHash::iterator it = m_filteredItems.find(oldItem); + if (it != m_filteredItems.end()) { + ItemData* itemData = it.value(); + itemData->item = newItem; + + // The data stored in 'values' might have changed. Therefore, we clear + // 'values' and re-populate it the next time it is requested via data(int). + itemData->values.clear(); + + m_filteredItems.erase(it); + m_filteredItems.insert(newItem, itemData); + } } } @@ -895,30 +1036,7 @@ // Extract the item-ranges out of the changed indexes qSort(indexes); - - KItemRangeList itemRangeList; - int previousIndex = indexes.at(0); - int rangeIndex = previousIndex; - int rangeCount = 1; - - const int maxIndex = indexes.count() - 1; - for (int i = 1; i <= maxIndex; ++i) { - const int currentIndex = indexes.at(i); - if (currentIndex == previousIndex + 1) { - ++rangeCount; - } else { - itemRangeList.append(KItemRange(rangeIndex, rangeCount)); - - rangeIndex = currentIndex; - rangeCount = 1; - } - previousIndex = currentIndex; - } - - if (rangeCount > 0) { - itemRangeList.append(KItemRange(rangeIndex, rangeCount)); - } - + const KItemRangeList itemRangeList = KItemRangeList::fromSortedContainer(indexes); emitItemsChangedAndTriggerResorting(itemRangeList, changedRoles); } @@ -949,11 +1067,6 @@ m_expandedDirs.clear(); } -void KFileItemModel::slotClear(const KUrl& url) -{ - Q_UNUSED(url); -} - void KFileItemModel::slotNaturalSortingChanged() { m_naturalSorting = KGlobalSettings::naturalSorting(); @@ -982,6 +1095,15 @@ #endif m_groups.clear(); + prepareItemsForSorting(newItems); + + if (m_sortRole == NameRole && m_naturalSorting) { + // Natural sorting of items can be very slow. However, it becomes much + // faster if the input sequence is already mostly sorted. Therefore, we + // first sort 'newItems' according to the QStrings returned by + // KFileItem::text() using QString::operator<(), which is quite fast. + parallelMergeSort(newItems.begin(), newItems.end(), nameLessThan, QThread::idealThreadCount()); + } sort(newItems.begin(), newItems.end()); @@ -1005,7 +1127,7 @@ m_itemData.append(0); } - // We build the new list m_items in reverse order to minimize + // We build the new list m_itemData in reverse order to minimize // the number of moves and guarantee O(N) complexity. int targetIndex = totalItemCount - 1; int sourceIndexExistingItems = existingItemCount - 1; @@ -1043,11 +1165,9 @@ std::reverse(itemRanges.begin(), itemRanges.end()); } - // The indexes starting from the first inserted item must be adjusted. - m_items.reserve(totalItemCount); - for (int i = itemRanges.front().index; i < totalItemCount; ++i) { - m_items.insert(m_itemData.at(i)->item.url(), i); - } + // The indexes in m_items are not correct anymore. Therefore, we clear m_items. + // It will be re-populated with the updated indices if index(const KUrl&) is called. + m_items.clear(); emit itemsInserted(itemRanges); @@ -1056,59 +1176,20 @@ #endif } -static KItemRangeList sortedIndexesToKItemRangeList(const QList& sortedNumbers) +void KFileItemModel::removeItems(const KItemRangeList& itemRanges, RemoveItemsBehavior behavior) { - if (sortedNumbers.empty()) { - return KItemRangeList(); - } - - KItemRangeList result; - - QList::const_iterator it = sortedNumbers.begin(); - int index = *it; - int count = 1; - - ++it; - - QList::const_iterator end = sortedNumbers.end(); - while (it != end) { - if (*it == index + count) { - ++count; - } else { - result << KItemRange(index, count); - index = *it; - count = 1; - } - ++it; + if (itemRanges.isEmpty()) { + return; } - result << KItemRange(index, count); - return result; -} - -void KFileItemModel::removeItems(const KFileItemList& items, RemoveItemsBehavior behavior) -{ -#ifdef KFILEITEMMODEL_DEBUG - kDebug() << "Removing " << items.count() << "items"; -#endif - m_groups.clear(); - // Step 1: Determine the indexes of the removed items, remove them from - // the hash m_items, and free the ItemData. - QList indexesToRemove; - indexesToRemove.reserve(items.count()); - foreach (const KFileItem& item, items) { - const KUrl url = item.url(); - const int index = m_items.value(url, -1); - if (index >= 0) { - indexesToRemove.append(index); - - // Prevent repeated expensive rehashing by using QHash::erase(), - // rather than QHash::remove(). - QHash::iterator it = m_items.find(url); - m_items.erase(it); + // Step 1: Remove the items from m_itemData, and free the ItemData. + int removedItemsCount = 0; + foreach (const KItemRange& range, itemRanges) { + removedItemsCount += range.count; + for (int index = range.index; index < range.index + range.count; ++index) { if (behavior == DeleteItemData) { delete m_itemData.at(index); } @@ -1117,14 +1198,7 @@ } } - if (indexesToRemove.isEmpty()) { - return; - } - - std::sort(indexesToRemove.begin(), indexesToRemove.end()); - // Step 2: Remove the ItemData pointers from the list m_itemData. - const KItemRangeList itemRanges = sortedIndexesToKItemRangeList(indexesToRemove); int target = itemRanges.at(0).index; int source = itemRanges.at(0).index + itemRanges.at(0).count; int nextRange = 1; @@ -1142,14 +1216,11 @@ } } - m_itemData.erase(m_itemData.end() - indexesToRemove.count(), m_itemData.end()); + m_itemData.erase(m_itemData.end() - removedItemsCount, m_itemData.end()); - // Step 3: Adjust indexes in the hash m_items, starting from the - // index of the first removed item. - const int newItemDataCount = m_itemData.count(); - for (int i = itemRanges.front().index; i < newItemDataCount; ++i) { - m_items.insert(m_itemData.at(i)->item.url(), i); - } + // The indexes in m_items are not correct anymore. Therefore, we clear m_items. + // It will be re-populated with the updated indices if index(const KUrl&) is called. + m_items.clear(); emit itemsRemoved(itemRanges); } @@ -1163,7 +1234,7 @@ determineMimeTypes(items, 200); } - const int parentIndex = m_items.value(parentUrl, -1); + const int parentIndex = index(parentUrl); ItemData* parentItem = parentIndex < 0 ? 0 : m_itemData.at(parentIndex); QList itemDataList; @@ -1172,7 +1243,6 @@ foreach (const KFileItem& item, items) { ItemData* itemData = new ItemData(); itemData->item = item; - itemData->values = retrieveData(item, parentItem); itemData->parent = parentItem; itemDataList.append(itemData); } @@ -1180,23 +1250,89 @@ return itemDataList; } +void KFileItemModel::prepareItemsForSorting(QList& itemDataList) +{ + switch (m_sortRole) { + case PermissionsRole: + case OwnerRole: + case GroupRole: + case DestinationRole: + case PathRole: + // These roles can be determined with retrieveData, and they have to be stored + // in the QHash "values" for the sorting. + foreach (ItemData* itemData, itemDataList) { + if (itemData->values.isEmpty()) { + itemData->values = retrieveData(itemData->item, itemData->parent); + } + } + break; + + case TypeRole: + // At least store the data including the file type for items with known MIME type. + foreach (ItemData* itemData, itemDataList) { + if (itemData->values.isEmpty()) { + const KFileItem item = itemData->item; + if (item.isDir() || item.isMimeTypeKnown()) { + itemData->values = retrieveData(itemData->item, itemData->parent); + } + } + } + break; + + default: + // The other roles are either resolved by KFileItemModelRolesUpdater + // (this includes the SizeRole for directories), or they do not need + // to be stored in the QHash "values" for sorting because the data can + // be retrieved directly from the KFileItem (NameRole, SizeRole for files, + // DateRole). + break; + } +} + +int KFileItemModel::expandedParentsCount(const ItemData* data) +{ + // The hash 'values' is only guaranteed to contain the key "expandedParentsCount" + // if the corresponding item is expanded, and it is not a top-level item. + const ItemData* parent = data->parent; + if (parent) { + if (parent->parent) { + Q_ASSERT(parent->values.contains("expandedParentsCount")); + return parent->values.value("expandedParentsCount").toInt() + 1; + } else { + return 1; + } + } else { + return 0; + } +} + void KFileItemModel::removeExpandedItems() { - KFileItemList expandedItems; + QVector indexesToRemove; const int maxIndex = m_itemData.count() - 1; for (int i = 0; i <= maxIndex; ++i) { const ItemData* itemData = m_itemData.at(i); - if (itemData->values.value("expandedParentsCount").toInt() > 0) { - expandedItems.append(itemData->item); + if (itemData->parent) { + indexesToRemove.append(i); } } - // The m_expandedParentsCountRoot may not get reset before all items with - // a bigger count have been removed. - removeItems(expandedItems, DeleteItemData); - + removeItems(KItemRangeList::fromSortedContainer(indexesToRemove), DeleteItemData); m_expandedDirs.clear(); + + // Also remove all filtered items which have a parent. + QHash::iterator it = m_filteredItems.begin(); + const QHash::iterator end = m_filteredItems.end(); + + while (it != end) { + if (it.value()->parent) { + delete it.value(); + it = m_filteredItems.erase(it); + } else { + ++it; + } + } } void KFileItemModel::emitItemsChangedAndTriggerResorting(const KItemRangeList& itemRanges, const QSet& changedRoles) @@ -1392,7 +1528,7 @@ if (m_requestRole[ExpandedParentsCountRole]) { if (parent) { - const int level = parent->values["expandedParentsCount"].toInt() + 1; + const int level = expandedParentsCount(parent) + 1; data.insert(sharedValue("expandedParentsCount"), level); } } @@ -1416,8 +1552,8 @@ int result = 0; if (a->parent != b->parent) { - const int expansionLevelA = a->values.value("expandedParentsCount").toInt(); - const int expansionLevelB = b->values.value("expandedParentsCount").toInt(); + const int expansionLevelA = expandedParentsCount(a); + const int expansionLevelB = expandedParentsCount(b); // If b has a higher expansion level than a, check if a is a parent // of b, and make sure that both expansion levels are equal otherwise. @@ -1437,7 +1573,7 @@ a = a->parent; } - Q_ASSERT(a->values.value("expandedParentsCount").toInt() == b->values.value("expandedParentsCount").toInt()); + Q_ASSERT(expandedParentsCount(a) == expandedParentsCount(b)); // Compare the last parents of a and b which are different. while (a->parent != b->parent) { @@ -1647,7 +1783,7 @@ continue; } - const QString name = m_itemData.at(i)->values.value("text").toString(); + const QString name = m_itemData.at(i)->item.text(); // Use the first character of the name as group indication QChar newFirstChar = name.at(0).toUpper(); @@ -1930,23 +2066,6 @@ return groups; } -KFileItemList KFileItemModel::childItems(const KFileItem& item) const -{ - KFileItemList items; - - int index = m_items.value(item.url(), -1); - if (index >= 0) { - const int parentLevel = m_itemData.at(index)->values.value("expandedParentsCount").toInt(); - ++index; - while (index < m_itemData.count() && m_itemData.at(index)->values.value("expandedParentsCount").toInt() > parentLevel) { - items.append(m_itemData.at(index)->item); - ++index; - } - } - - return items; -} - void KFileItemModel::emitSortProgress(int resolvedCount) { // Be tolerant against a resolvedCount with a wrong range. @@ -1978,7 +2097,7 @@ const KFileItemModel::RoleInfoMap* KFileItemModel::rolesInfoMap(int& count) { static const RoleInfoMap rolesInfoMap[] = { - // | role | roleType | role translation | group translation | requires Nepomuk | requires indexer + // | role | roleType | role translation | group translation | requires Baloo | requires indexer { 0, NoRole, 0, 0, 0, 0, false, false }, { "text", NameRole, I18N_NOOP2_NOSTRIP("@label", "Name"), 0, 0, false, false }, { "size", SizeRole, I18N_NOOP2_NOSTRIP("@label", "Size"), 0, 0, false, false }, @@ -2044,7 +2163,9 @@ bool KFileItemModel::isConsistent() const { - if (m_items.count() != m_itemData.count()) { + // m_items may contain less items than m_itemData because m_items + // is populated lazily, see KFileItemModel::index(const KUrl& url). + if (m_items.count() > m_itemData.count()) { return false; } @@ -2073,7 +2194,7 @@ const ItemData* data = m_itemData.at(i); const ItemData* parent = data->parent; if (parent) { - if (data->values.value("expandedParentsCount").toInt() != parent->values.value("expandedParentsCount").toInt() + 1) { + if (expandedParentsCount(data) != expandedParentsCount(parent) + 1) { qWarning() << "expandedParentsCount is inconsistent for parent" << parent->item << "and child" << data->item; return false; } diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kfileitemmodel.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kfileitemmodel.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kfileitemmodel.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kfileitemmodel.h 2014-05-26 15:31:22.000000000 +0000 @@ -27,6 +27,7 @@ #include #include +#include class KFileItemModelDirLister; class QTimer; @@ -99,7 +100,7 @@ bool showDirectoriesOnly() const; /** @reimp */ - virtual QMimeData* createMimeData(const QSet& indexes) const; + virtual QMimeData* createMimeData(const KItemSet& indexes) const; /** @reimp */ virtual int indexForKeyboardSearch(const QString& text, int startFromIndex = 0) const; @@ -129,14 +130,14 @@ /** * @return The index for the file-item \a item. -1 is returned if no file-item - * is found or if the file-item is null. The runtime + * is found or if the file-item is null. The amortized runtime * complexity of this call is O(1). */ int index(const KFileItem& item) const; /** * @return The index for the URL \a url. -1 is returned if no file-item - * is found. The runtime complexity of this call is O(1). + * is found. The amortized runtime complexity of this call is O(1). */ int index(const KUrl& url) const; @@ -186,14 +187,14 @@ { QByteArray role; QString translation; QString group; - bool requiresNepomuk; + bool requiresBaloo; bool requiresIndexer; }; /** * @return Provides static information for all available roles that * are supported by KFileItemModel. Some roles can only be - * determined if Nepomuk is enabled and/or the Nepomuk + * determined if Baloo is enabled and/or the Baloo * indexing is enabled. */ static QList rolesInformation(); @@ -276,7 +277,6 @@ void slotItemsDeleted(const KFileItemList& items); void slotRefreshItems(const QList >& items); void slotClear(); - void slotClear(const KUrl& url); void slotNaturalSortingChanged(); void dispatchPendingItemsToInsert(); @@ -286,7 +286,7 @@ // User visible roles: NoRole, NameRole, SizeRole, DateRole, PermissionsRole, OwnerRole, GroupRole, TypeRole, DestinationRole, PathRole, - // User visible roles available with Nepomuk: + // User visible roles available with Baloo: CommentRole, TagsRole, RatingRole, ImageSizeRole, OrientationRole, WordCountRole, LineCountRole, ArtistRole, AlbumRole, DurationRole, TrackRole, CopiedFromRole, @@ -309,7 +309,7 @@ }; void insertItems(QList& items); - void removeItems(const KFileItemList& items, RemoveItemsBehavior behavior); + void removeItems(const KItemRangeList& itemRanges, RemoveItemsBehavior behavior); /** * Helper method for insertItems() and removeItems(): Creates @@ -319,6 +319,15 @@ */ QList createItemDataList(const KUrl& parentUrl, const KFileItemList& items) const; + /** + * Prepares the items for sorting. Normally, the hash 'values' in ItemData is filled + * lazily to save time and memory, but for some sort roles, it is expected that the + * sort role data is stored in 'values'. + */ + void prepareItemsForSorting(QList& itemDataList); + + static int expandedParentsCount(const ItemData* data); + void removeExpandedItems(); /** @@ -348,6 +357,12 @@ QHash retrieveData(const KFileItem& item, const ItemData* parent) const; /** + * @return True if \a a has a KFileItem whose text is 'less than' the one + * of \a b according to QString::operator<(const QString&). + */ + static bool nameLessThan(const ItemData* a, const ItemData* b); + + /** * @return True if the item-data \a a should be ordered before the item-data * \b. The item-data may have different parent-items. */ @@ -388,11 +403,6 @@ bool isChildItem(int index) const; /** - * @return Recursive list of child items that have \a item as upper most parent. - */ - KFileItemList childItems(const KFileItem& item) const; - - /** * Is invoked by KFileItemModelRolesUpdater and results in emitting the * sortProgress signal with a percent-value of the progress. */ @@ -407,7 +417,7 @@ * Removes filtered items whose expanded parents have been deleted * or collapsed via setExpanded(parentIndex, false). */ - void removeFilteredChildren(const KFileItemList& parentsList); + void removeFilteredChildren(const KItemRangeList& parents); /** * Maps the QByteArray-roles to RoleTypes and provides translation- and @@ -421,7 +431,7 @@ const char* const roleTranslation; const char* const groupTranslationContext; const char* const groupTranslation; - const bool requiresNepomuk; + const bool requiresBaloo; const bool requiresIndexer; }; @@ -459,7 +469,12 @@ Qt::CaseSensitivity m_caseSensitivity; QList m_itemData; - QHash m_items; // Allows O(1) access for KFileItemModel::index(const KFileItem& item) + + // m_items is a cache for the method index(const KUrl&). If it contains N + // entries, it is guaranteed that these correspond to the first N items in + // the model, i.e., that (for every i between 0 and N - 1) + // m_items.value(fileItem(i).url()) == i + mutable QHash m_items; KFileItemModelFilter m_filter; QHash m_filteredItems; // Items that got hidden by KFileItemModel::setNameFilter() @@ -488,9 +503,19 @@ friend class DolphinPart; // Accesses m_dirLister }; +inline bool KFileItemModel::nameLessThan(const ItemData* a, const ItemData* b) +{ + return a->item.text() < b->item.text(); +} + + inline bool KFileItemModel::isChildItem(int index) const { - return m_requestRole[ExpandedParentsCountRole] && m_itemData.at(index)->values.value("expandedParentsCount").toInt() > 0; + if (m_itemData.at(index)->parent) { + return true; + } else { + return false; + } } #endif diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kfileitemmodelrolesupdater.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kfileitemmodelrolesupdater.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kfileitemmodelrolesupdater.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kfileitemmodelrolesupdater.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -24,13 +24,13 @@ #include #include #include -#include #include #include #include #include #include "private/kpixmapmodifier.h" +#include "private/kdirectorycontentscounter.h" #include #include @@ -40,18 +40,11 @@ #include -#ifdef HAVE_NEPOMUK - #include "private/knepomukrolesprovider.h" - #include - #include -#endif - -// Required includes for subItemsCount(): -#ifdef Q_WS_WIN - #include -#else - #include - #include +#ifdef HAVE_BALOO + #include "private/kbaloorolesprovider.h" + #include + #include + #include #endif // #define KFILEITEMMODELROLESUPDATER_DEBUG @@ -95,11 +88,9 @@ m_recentlyChangedItemsTimer(0), m_recentlyChangedItems(), m_changedItems(), - m_dirWatcher(0), - m_watchedDirs() - #ifdef HAVE_NEPOMUK - , m_nepomukResourceWatcher(0), - m_nepomukUriItems() + m_directoryContentsCounter(0) + #ifdef HAVE_BALOO + , m_balooFileMonitor(0) #endif { Q_ASSERT(model); @@ -131,14 +122,13 @@ m_resolvableRoles.insert("size"); m_resolvableRoles.insert("type"); m_resolvableRoles.insert("isExpandable"); -#ifdef HAVE_NEPOMUK - m_resolvableRoles += KNepomukRolesProvider::instance().roles(); +#ifdef HAVE_BALOO + m_resolvableRoles += KBalooRolesProvider::instance().roles(); #endif - // When folders are expandable or the item-count is shown for folders, it is necessary - // to watch the number of items of the sub-folder to be able to react on changes. - m_dirWatcher = new KDirWatch(this); - connect(m_dirWatcher, SIGNAL(dirty(QString)), this, SLOT(slotDirWatchDirty(QString))); + m_directoryContentsCounter = new KDirectoryContentsCounter(m_model, this); + connect(m_directoryContentsCounter, SIGNAL(result(QString,int)), + this, SLOT(slotDirectoryContentsCountReceived(QString,int))); } KFileItemModelRolesUpdater::~KFileItemModelRolesUpdater() @@ -272,34 +262,29 @@ if (m_roles != roles) { m_roles = roles; -#ifdef HAVE_NEPOMUK - if (Nepomuk2::ResourceManager::instance()->initialized()) { - // Check whether there is at least one role that must be resolved - // with the help of Nepomuk. If this is the case, a (quite expensive) - // resolving will be done in KFileItemModelRolesUpdater::rolesData() and - // the role gets watched for changes. - const KNepomukRolesProvider& rolesProvider = KNepomukRolesProvider::instance(); - bool hasNepomukRole = false; - QSetIterator it(roles); - while (it.hasNext()) { - const QByteArray& role = it.next(); - if (rolesProvider.roles().contains(role)) { - hasNepomukRole = true; - break; - } +#ifdef HAVE_BALOO + // Check whether there is at least one role that must be resolved + // with the help of Baloo. If this is the case, a (quite expensive) + // resolving will be done in KFileItemModelRolesUpdater::rolesData() and + // the role gets watched for changes. + const KBalooRolesProvider& rolesProvider = KBalooRolesProvider::instance(); + bool hasBalooRole = false; + QSetIterator it(roles); + while (it.hasNext()) { + const QByteArray& role = it.next(); + if (rolesProvider.roles().contains(role)) { + hasBalooRole = true; + break; } + } - if (hasNepomukRole && !m_nepomukResourceWatcher) { - Q_ASSERT(m_nepomukUriItems.isEmpty()); - - m_nepomukResourceWatcher = new Nepomuk2::ResourceWatcher(this); - connect(m_nepomukResourceWatcher, SIGNAL(propertyChanged(Nepomuk2::Resource,Nepomuk2::Types::Property,QVariantList,QVariantList)), - this, SLOT(applyChangedNepomukRoles(Nepomuk2::Resource,Nepomuk2::Types::Property))); - } else if (!hasNepomukRole && m_nepomukResourceWatcher) { - delete m_nepomukResourceWatcher; - m_nepomukResourceWatcher = 0; - m_nepomukUriItems.clear(); - } + if (hasBalooRole && !m_balooFileMonitor) { + m_balooFileMonitor = new Baloo::FileMonitor(this); + connect(m_balooFileMonitor, SIGNAL(fileMetaDataChanged(QString)), + this, SLOT(applyChangedBalooRoles(QString))); + } else if (!hasBalooRole && m_balooFileMonitor) { + delete m_balooFileMonitor; + m_balooFileMonitor = 0; } #endif @@ -367,49 +352,19 @@ const bool allItemsRemoved = (m_model->count() == 0); - if (!m_watchedDirs.isEmpty()) { - // Don't let KDirWatch watch for removed items +#ifdef HAVE_BALOO + if (m_balooFileMonitor) { + // Don't let the FileWatcher watch for removed items if (allItemsRemoved) { - foreach (const QString& path, m_watchedDirs) { - m_dirWatcher->removeDir(path); - } - m_watchedDirs.clear(); + m_balooFileMonitor->clear(); } else { - QMutableSetIterator it(m_watchedDirs); - while (it.hasNext()) { - const QString& path = it.next(); - if (m_model->index(KUrl(path)) < 0) { - m_dirWatcher->removeDir(path); - it.remove(); - } - } - } - } - -#ifdef HAVE_NEPOMUK - if (m_nepomukResourceWatcher) { - // Don't let the ResourceWatcher watch for removed items - if (allItemsRemoved) { - m_nepomukResourceWatcher->setResources(QList()); - m_nepomukResourceWatcher->stop(); - m_nepomukUriItems.clear(); - } else { - QList newResources; - const QList oldResources = m_nepomukResourceWatcher->resources(); - foreach (const Nepomuk2::Resource& resource, oldResources) { - const QUrl uri = resource.uri(); - const KUrl itemUrl = m_nepomukUriItems.value(uri); + QStringList newFileList; + foreach (const QString& itemUrl, m_balooFileMonitor->files()) { if (m_model->index(itemUrl) >= 0) { - newResources.append(resource); - } else { - m_nepomukUriItems.remove(uri); + newFileList.append(itemUrl); } } - m_nepomukResourceWatcher->setResources(newResources); - if (newResources.isEmpty()) { - Q_ASSERT(m_nepomukUriItems.isEmpty()); - m_nepomukResourceWatcher->stop(); - } + m_balooFileMonitor->setFiles(newFileList); } } #endif @@ -616,7 +571,7 @@ connect(m_model, SIGNAL(itemsChanged(KItemRangeList,QSet)), this, SLOT(slotItemsChanged(KItemRangeList,QSet))); - applyResolvedRoles(item, ResolveAll); + applyResolvedRoles(index, ResolveAll); m_finishedItems.insert(item); } } @@ -693,7 +648,7 @@ continue; } - applyResolvedRoles(item, ResolveAll); + applyResolvedRoles(index, ResolveAll); m_finishedItems.insert(item); m_changedItems.remove(item); break; @@ -737,14 +692,9 @@ updateChangedItems(); } -void KFileItemModelRolesUpdater::applyChangedNepomukRoles(const Nepomuk2::Resource& resource, const Nepomuk2::Types::Property& property) +void KFileItemModelRolesUpdater::applyChangedBalooRoles(const QString& itemUrl) { -#ifdef HAVE_NEPOMUK - if (!Nepomuk2::ResourceManager::instance()->initialized()) { - return; - } - - const KUrl itemUrl = m_nepomukUriItems.value(resource.uri()); +#ifdef HAVE_BALOO const KFileItem item = m_model->fileItem(itemUrl); if (item.isNull()) { @@ -753,18 +703,34 @@ return; } - QHash data = rolesData(item); + Baloo::FileFetchJob* job = new Baloo::FileFetchJob(item.localPath()); + connect(job, SIGNAL(finished(KJob*)), this, SLOT(applyChangedBalooRolesJobFinished(KJob*))); + job->setProperty("item", QVariant::fromValue(item)); + job->start(); +#else +#ifndef Q_CC_MSVC + Q_UNUSED(itemUrl); +#endif +#endif +} + +void KFileItemModelRolesUpdater::applyChangedBalooRolesJobFinished(KJob* kjob) +{ +#ifdef HAVE_BALOO + const KFileItem item = kjob->property("item").value(); + + const KBalooRolesProvider& rolesProvider = KBalooRolesProvider::instance(); + QHash data; - const KNepomukRolesProvider& rolesProvider = KNepomukRolesProvider::instance(); - const QByteArray role = rolesProvider.roleForPropertyUri(property.uri()); - if (!role.isEmpty() && m_roles.contains(role)) { - // Overwrite the changed role value with an empty QVariant, because the roles + foreach (const QByteArray& role, rolesProvider.roles()) { + // Overwrite all the role values with an empty QVariant, because the roles // provider doesn't overwrite it when the property value list is empty. // See bug 322348 data.insert(role, QVariant()); } - QHashIterator it(rolesProvider.roleValues(resource, m_roles)); + Baloo::FileFetchJob* job = static_cast(kjob); + QHashIterator it(rolesProvider.roleValues(job->file(), m_roles)); while (it.hasNext()) { it.next(); data.insert(it.key(), it.value()); @@ -776,14 +742,10 @@ m_model->setData(index, data); connect(m_model, SIGNAL(itemsChanged(KItemRangeList,QSet)), this, SLOT(slotItemsChanged(KItemRangeList,QSet))); -#else -#ifndef Q_CC_MSVC - Q_UNUSED(resource); -#endif #endif } -void KFileItemModelRolesUpdater::slotDirWatchDirty(const QString& path) +void KFileItemModelRolesUpdater::slotDirectoryContentsCountReceived(const QString& path, int count) { const bool getSizeRole = m_roles.contains("size"); const bool getIsExpandableRole = m_roles.contains("isExpandable"); @@ -791,16 +753,8 @@ if (getSizeRole || getIsExpandableRole) { const int index = m_model->index(KUrl(path)); if (index >= 0) { - if (!m_model->fileItem(index).isDir()) { - // If INotify is used, KDirWatch issues the dirty() signal - // also for changed files inside the directory, even if we - // don't enable this behavior explicitly (see bug 309740). - return; - } - QHash data; - const int count = subItemsCount(path); if (getSizeRole) { data.insert("size", count); } @@ -808,9 +762,11 @@ data.insert("isExpandable", count > 0); } - // Note that we do not block the itemsChanged signal here. - // This ensures that a new preview will be generated. + disconnect(m_model, SIGNAL(itemsChanged(KItemRangeList,QSet)), + this, SLOT(slotItemsChanged(KItemRangeList,QSet))); m_model->setData(index, data); + connect(m_model, SIGNAL(itemsChanged(KItemRangeList,QSet)), + this, SLOT(slotItemsChanged(KItemRangeList,QSet))); } } } @@ -884,8 +840,7 @@ // Try to determine the final icons for all visible items. int index; for (index = m_firstVisibleIndex; index <= lastVisibleIndex && timer.elapsed() < MaxBlockTimeout; ++index) { - const KFileItem item = m_model->fileItem(index); - applyResolvedRoles(item, ResolveFast); + applyResolvedRoles(index, ResolveFast); } // KFileItemListView::initializeItemListWidget(KItemListWidget*) will load @@ -1037,9 +992,9 @@ data.insert("type", item.mimeComment()); } else if (m_model->sortRole() == "size" && item.isLocalFile() && item.isDir()) { const QString path = item.localPath(); - data.insert("size", subItemsCount(path)); + data.insert("size", m_directoryContentsCounter->countDirectoryContentsSynchronously(path)); } else { - // Probably the sort role is a Nepomuk role - just determine all roles. + // Probably the sort role is a baloo role - just determine all roles. data = rolesData(item); } @@ -1058,27 +1013,20 @@ m_model->emitSortProgress(resolvedCount); } -bool KFileItemModelRolesUpdater::applyResolvedRoles(const KFileItem& item, ResolveHint hint) +bool KFileItemModelRolesUpdater::applyResolvedRoles(int index, ResolveHint hint) { - if (item.isNull()) { - return false; - } - + const KFileItem item = m_model->fileItem(index); const bool resolveAll = (hint == ResolveAll); bool iconChanged = false; if (!item.isMimeTypeKnown() || !item.isFinalIconKnown()) { item.determineMimeType(); iconChanged = true; - } else { - const int index = m_model->index(item); - if (!m_model->data(index).contains("iconName")) { - iconChanged = true; - } + } else if (!m_model->data(index).contains("iconName")) { + iconChanged = true; } if (iconChanged || resolveAll || m_clearPreviews) { - const int index = m_model->index(item); if (index < 0) { return false; } @@ -1105,7 +1053,7 @@ return false; } -QHash KFileItemModelRolesUpdater::rolesData(const KFileItem& item) const +QHash KFileItemModelRolesUpdater::rolesData(const KFileItem& item) { QHash data; @@ -1114,19 +1062,10 @@ if ((getSizeRole || getIsExpandableRole) && item.isDir()) { if (item.isLocalFile()) { + // Tell m_directoryContentsCounter that we want to count the items + // inside the directory. The result will be received in slotDirectoryContentsCountReceived. const QString path = item.localPath(); - const int count = subItemsCount(path); - if (getSizeRole) { - data.insert("size", count); - } - if (getIsExpandableRole) { - data.insert("isExpandable", count > 0); - } - - if (!m_dirWatcher->contains(path)) { - m_dirWatcher->addDir(path); - m_watchedDirs.insert(path); - } + m_directoryContentsCounter->addDirectory(path); } else if (getSizeRole) { data.insert("size", -1); // -1 indicates an unknown number of items } @@ -1138,93 +1077,15 @@ data.insert("iconOverlays", item.overlays()); -#ifdef HAVE_NEPOMUK - if (m_nepomukResourceWatcher) { - const KNepomukRolesProvider& rolesProvider = KNepomukRolesProvider::instance(); - Nepomuk2::Resource resource(item.nepomukUri()); - QHashIterator it(rolesProvider.roleValues(resource, m_roles)); - while (it.hasNext()) { - it.next(); - data.insert(it.key(), it.value()); - } - - QUrl uri = resource.uri(); - if (uri.isEmpty()) { - // TODO: Is there another way to explicitly create a resource? - // We need a resource to be able to track it for changes. - resource.setRating(0); - uri = resource.uri(); - } - if (!uri.isEmpty() && !m_nepomukUriItems.contains(uri)) { - m_nepomukResourceWatcher->addResource(resource); - - if (m_nepomukUriItems.isEmpty()) { - m_nepomukResourceWatcher->start(); - } - - m_nepomukUriItems.insert(uri, item.url()); - } +#ifdef HAVE_BALOO + if (m_balooFileMonitor) { + m_balooFileMonitor->addFile(item.localPath()); + applyChangedBalooRoles(item.localPath()); } #endif - return data; } -int KFileItemModelRolesUpdater::subItemsCount(const QString& path) const -{ - const bool countHiddenFiles = m_model->showHiddenFiles(); - const bool showFoldersOnly = m_model->showDirectoriesOnly(); - -#ifdef Q_WS_WIN - QDir dir(path); - QDir::Filters filters = QDir::NoDotAndDotDot | QDir::System; - if (countHiddenFiles) { - filters |= QDir::Hidden; - } - if (showFoldersOnly) { - filters |= QDir::Dirs; - } else { - filters |= QDir::AllEntries; - } - return dir.entryList(filters).count(); -#else - // Taken from kdelibs/kio/kio/kdirmodel.cpp - // Copyright (C) 2006 David Faure - - int count = -1; - DIR* dir = ::opendir(QFile::encodeName(path)); - if (dir) { // krazy:exclude=syscalls - count = 0; - struct dirent *dirEntry = 0; - while ((dirEntry = ::readdir(dir))) { - if (dirEntry->d_name[0] == '.') { - if (dirEntry->d_name[1] == '\0' || !countHiddenFiles) { - // Skip "." or hidden files - continue; - } - if (dirEntry->d_name[1] == '.' && dirEntry->d_name[2] == '\0') { - // Skip ".." - continue; - } - } - - // If only directories are counted, consider an unknown file type and links also - // as directory instead of trying to do an expensive stat() - // (see bugs 292642 and 299997). - const bool countEntry = !showFoldersOnly || - dirEntry->d_type == DT_DIR || - dirEntry->d_type == DT_LNK || - dirEntry->d_type == DT_UNKNOWN; - if (countEntry) { - ++count; - } - } - ::closedir(dir); - } - return count; -#endif -} - void KFileItemModelRolesUpdater::updateAllPreviews() { if (m_state == Paused) { diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kfileitemmodelrolesupdater.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kfileitemmodelrolesupdater.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kfileitemmodelrolesupdater.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kfileitemmodelrolesupdater.h 2014-05-26 15:31:22.000000000 +0000 @@ -20,7 +20,7 @@ #ifndef KFILEITEMMODELROLESUPDATER_H #define KFILEITEMMODELROLESUPDATER_H -#include +#include #include #include @@ -32,32 +32,16 @@ #include #include -class KDirWatch; +class KDirectoryContentsCounter; class KFileItemModel; class KJob; class QPixmap; class QTimer; -#ifdef HAVE_NEPOMUK - namespace Nepomuk2 +#ifdef HAVE_BALOO + namespace Baloo { - class ResourceWatcher; - class Resource; - namespace Types - { - class Property; - } - } -#else - // Required for the slot applyChangedNepomukRoles() that - // cannot be ifdefined due to moc. - namespace Nepomuk2 - { - class Resource; - namespace Types - { - class Property; - } + class FileMonitor; } #endif @@ -216,14 +200,10 @@ */ void resolveRecentlyChangedItems(); - void applyChangedNepomukRoles(const Nepomuk2::Resource& resource, const Nepomuk2::Types::Property& property); + void applyChangedBalooRoles(const QString& file); + void applyChangedBalooRolesJobFinished(KJob* job); - /** - * Is invoked if a directory watched by KDirWatch got dirty. Updates - * the "isExpandable"- and "size"-roles of the item that matches to - * the given path. - */ - void slotDirWatchDirty(const QString& path); + void slotDirectoryContentsCountReceived(const QString& path, int count); private: /** @@ -266,8 +246,8 @@ ResolveFast, ResolveAll }; - bool applyResolvedRoles(const KFileItem& item, ResolveHint hint); - QHash rolesData(const KFileItem& item) const; + bool applyResolvedRoles(int index, ResolveHint hint); + QHash rolesData(const KFileItem& item); /** * @return The number of items of the path \a path. @@ -349,12 +329,10 @@ // Items which have not been changed repeatedly recently. QSet m_changedItems; - KDirWatch* m_dirWatcher; - mutable QSet m_watchedDirs; // Required as sadly KDirWatch does not offer a getter method - // to get all watched directories. -#ifdef HAVE_NEPOMUK - Nepomuk2::ResourceWatcher* m_nepomukResourceWatcher; - mutable QHash m_nepomukUriItems; + KDirectoryContentsCounter* m_directoryContentsCounter; + +#ifdef HAVE_BALOO + Baloo::FileMonitor* m_balooFileMonitor; #endif }; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistcontainer.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistcontainer.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistcontainer.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistcontainer.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -338,26 +338,28 @@ int extra = frameWidth() * 2; QStyleOption option; option.initFrom(this); + int scrollbarSpacing = 0; if (style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents, &option, this)) { - extra += style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarSpacing, &option, this); + scrollbarSpacing = style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarSpacing, &option, this); } const int widthDec = verticalScrollBar()->isVisible() - ? extra + style()->pixelMetric(QStyle::PM_ScrollBarExtent, &option, this) + ? extra + scrollbarSpacing + style()->pixelMetric(QStyle::PM_ScrollBarExtent, &option, this) : extra; const int heightDec = horizontalScrollBar()->isVisible() - ? extra + style()->pixelMetric(QStyle::PM_ScrollBarExtent, &option, this) + ? extra + scrollbarSpacing + style()->pixelMetric(QStyle::PM_ScrollBarExtent, &option, this) : extra; - rect.adjust(0, 0, -widthDec, -heightDec); - - const QRectF newGeometry(0, 0, rect.width(), rect.height()); + const QRectF newGeometry(0, 0, rect.width() - widthDec, + rect.height() - heightDec); if (m_controller->view()->geometry() != newGeometry) { m_controller->view()->setGeometry(newGeometry); - static_cast(viewport())->scene()->setSceneRect(0, 0, rect.width(), rect.height()); - static_cast(viewport())->viewport()->setGeometry(QRect(0, 0, rect.width(), rect.height())); + // Get the real geometry of the view again since the scrollbars + // visibilities and the view geometry may have changed in re-layout. + static_cast(viewport())->scene()->setSceneRect(m_controller->view()->geometry()); + static_cast(viewport())->viewport()->setGeometry(m_controller->view()->geometry().toRect()); updateScrollOffsetScrollBar(); updateItemOffsetScrollBar(); diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistcontroller.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistcontroller.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistcontroller.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistcontroller.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -364,41 +364,28 @@ case Qt::Key_Enter: case Qt::Key_Return: { - const QSet selectedItems = m_selectionManager->selectedItems(); + const KItemSet selectedItems = m_selectionManager->selectedItems(); if (selectedItems.count() >= 2) { emit itemsActivated(selectedItems); } else if (selectedItems.count() == 1) { - emit itemActivated(selectedItems.toList().first()); + emit itemActivated(selectedItems.first()); } else { emit itemActivated(index); } break; } - case Qt::Key_Space: - if (m_selectionBehavior == MultiSelection) { - if (controlPressed) { - m_selectionManager->endAnchoredSelection(); - m_selectionManager->setSelected(index, 1, KItemListSelectionManager::Toggle); - m_selectionManager->beginAnchoredSelection(index); - } else { - const int current = m_selectionManager->currentItem(); - m_selectionManager->setSelected(current); - } - } - break; - case Qt::Key_Menu: { // Emit the signal itemContextMenuRequested() in case if at least one // item is selected. Otherwise the signal viewContextMenuRequested() will be emitted. - const QSet selectedItems = m_selectionManager->selectedItems(); + const KItemSet selectedItems = m_selectionManager->selectedItems(); int index = -1; if (selectedItems.count() >= 2) { const int currentItemIndex = m_selectionManager->currentItem(); index = selectedItems.contains(currentItemIndex) - ? currentItemIndex : selectedItems.toList().first(); + ? currentItemIndex : selectedItems.first(); } else if (selectedItems.count() == 1) { - index = selectedItems.toList().first(); + index = selectedItems.first(); } if (index >= 0) { @@ -416,8 +403,28 @@ m_selectionManager->clearSelection(); } m_keyboardManager->cancelSearch(); + emit escapePressed(); break; + case Qt::Key_Space: + if (m_selectionBehavior == MultiSelection) { + if (controlPressed) { + // Toggle the selection state of the current item. + m_selectionManager->endAnchoredSelection(); + m_selectionManager->setSelected(index, 1, KItemListSelectionManager::Toggle); + m_selectionManager->beginAnchoredSelection(index); + break; + } else { + // Select the current item if it is not selected yet. + const int current = m_selectionManager->currentItem(); + if (!m_selectionManager->isSelected(current)) { + m_selectionManager->setSelected(current); + break; + } + } + } + // Fall through to the default case and add the Space to the current search string. + default: m_keyboardManager->addKeys(event->text()); // Make sure unconsumed events get propagated up the chain. #302329 @@ -474,9 +481,13 @@ } if (index >= 0) { m_selectionManager->setCurrentItem(index); - m_selectionManager->clearSelection(); - m_selectionManager->setSelected(index, 1); - m_selectionManager->beginAnchoredSelection(index); + + if (m_selectionBehavior != NoSelection) { + m_selectionManager->clearSelection(); + m_selectionManager->setSelected(index, 1); + m_selectionManager->beginAnchoredSelection(index); + } + m_view->scrollToItem(index); } } @@ -527,6 +538,13 @@ m_pressedIndex = m_view->itemAt(m_pressedMousePos); emit mouseButtonPressed(m_pressedIndex, event->buttons()); + // TODO: Qt5: Replace Qt::XButton1 by Qt::BackButton and Qt::XButton2 by Qt::ForwardButton + if (event->buttons() & (Qt::XButton1 | Qt::XButton2)) { + // Do not select items when clicking the back/forward buttons, see + // https://bugs.kde.org/show_bug.cgi?id=327412. + return true; + } + if (m_view->isAboveExpansionToggle(m_pressedIndex, m_pressedMousePos)) { m_selectionManager->endAnchoredSelection(); m_selectionManager->setCurrentItem(m_pressedIndex); @@ -933,8 +951,13 @@ if (newHoveredWidget) { newHoveredWidget->setHovered(true); + const QPointF mappedPos = newHoveredWidget->mapFromItem(m_view, pos); + newHoveredWidget->setHoverPosition(mappedPos); emit itemHovered(newHoveredWidget->index()); } + } else if (oldHoveredWidget) { + const QPointF mappedPos = oldHoveredWidget->mapFromItem(m_view, pos); + oldHoveredWidget->setHoverPosition(mappedPos); } return false; @@ -1068,7 +1091,7 @@ } } - QSet selectedItems; + KItemSet selectedItems; // Select all visible items that intersect with the rubberband foreach (const KItemListWidget* widget, m_view->visibleItemListWidgets()) { @@ -1116,7 +1139,7 @@ // Therefore, the new selection contains: // 1. All previously selected items which are not inside the rubberband, and // 2. all items inside the rubberband which have not been selected previously. - m_selectionManager->setSelectedItems((m_oldSelection - selectedItems) + (selectedItems - m_oldSelection)); + m_selectionManager->setSelectedItems(m_oldSelection ^ selectedItems); } else { m_selectionManager->setSelectedItems(selectedItems + m_oldSelection); @@ -1129,7 +1152,7 @@ return; } - const QSet selectedItems = m_selectionManager->selectedItems(); + const KItemSet selectedItems = m_selectionManager->selectedItems(); if (selectedItems.isEmpty()) { return; } diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistcontroller.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistcontroller.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistcontroller.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistcontroller.h 2014-05-26 15:31:22.000000000 +0000 @@ -25,10 +25,11 @@ #include +#include "kitemset.h" + #include #include #include -#include class KItemModelBase; class KItemListKeyboardSearchManager; @@ -129,7 +130,7 @@ /** * If set to true, the signals itemActivated() and itemsActivated() are emitted - * after a single-click of the left mouse button. If set to false (the default), + * after a single-click of the left mouse button. If set to false (the default), * the setting from KGlobalSettings::singleClick() is used. */ void setSingleClickActivationEnforced(bool singleClick); @@ -165,7 +166,7 @@ * Is emitted if more than one item has been activated by pressing Return/Enter * when having a selection. */ - void itemsActivated(const QSet& indexes); + void itemsActivated(const KItemSet& indexes); void itemMiddleClicked(int index); @@ -230,6 +231,11 @@ */ void aboveItemDropEvent(int index, QGraphicsSceneDragDropEvent* event); + /** + * Is emitted if the Escape key is pressed. + */ + void escapePressed(); + void modelChanged(KItemModelBase* current, KItemModelBase* previous); void viewChanged(KItemListView* current, KItemListView* previous); @@ -321,7 +327,7 @@ * the current selection it is remembered in m_oldSelection before the * rubberband gets activated. */ - QSet m_oldSelection; + KItemSet m_oldSelection; /** * Assuming a view is given with a vertical scroll-orientation, grouped items and diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistselectionmanager.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistselectionmanager.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistselectionmanager.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistselectionmanager.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -43,7 +43,7 @@ void KItemListSelectionManager::setCurrentItem(int current) { const int previous = m_currentItem; - const QSet previousSelection = selectedItems(); + const KItemSet previousSelection = selectedItems(); if (m_model && current >= 0 && current < m_model->count()) { m_currentItem = current; @@ -55,7 +55,7 @@ emit currentChanged(m_currentItem, previous); if (m_isAnchoredSelectionActive) { - const QSet selection = selectedItems(); + const KItemSet selection = selectedItems(); if (selection != previousSelection) { emit selectionChanged(selection, previousSelection); } @@ -68,18 +68,18 @@ return m_currentItem; } -void KItemListSelectionManager::setSelectedItems(const QSet& items) +void KItemListSelectionManager::setSelectedItems(const KItemSet& items) { if (m_selectedItems != items) { - const QSet previous = m_selectedItems; + const KItemSet previous = m_selectedItems; m_selectedItems = items; emit selectionChanged(m_selectedItems, previous); } } -QSet KItemListSelectionManager::selectedItems() const +KItemSet KItemListSelectionManager::selectedItems() const { - QSet selectedItems = m_selectedItems; + KItemSet selectedItems = m_selectedItems; if (m_isAnchoredSelectionActive && m_anchorItem != m_currentItem) { Q_ASSERT(m_anchorItem >= 0); @@ -127,7 +127,7 @@ } endAnchoredSelection(); - const QSet previous = selectedItems(); + const KItemSet previous = selectedItems(); count = qMin(count, m_model->count() - index); @@ -160,7 +160,7 @@ break; } - const QSet selection = selectedItems(); + const KItemSet selection = selectedItems(); if (selection != previous) { emit selectionChanged(selection, previous); } @@ -168,11 +168,11 @@ void KItemListSelectionManager::clearSelection() { - const QSet previous = selectedItems(); + const KItemSet previous = selectedItems(); if (!previous.isEmpty()) { m_selectedItems.clear(); m_isAnchoredSelectionActive = false; - emit selectionChanged(QSet(), previous); + emit selectionChanged(KItemSet(), previous); } } @@ -221,7 +221,7 @@ void KItemListSelectionManager::itemsInserted(const KItemRangeList& itemRanges) { // Store the current selection (needed in the selectionChanged() signal) - const QSet previousSelection = selectedItems(); + const KItemSet previousSelection = selectedItems(); // Update the current item if (m_currentItem < 0) { @@ -257,12 +257,10 @@ // Update the selections if (!m_selectedItems.isEmpty()) { - const QSet previous = m_selectedItems; + const KItemSet previous = m_selectedItems; m_selectedItems.clear(); - m_selectedItems.reserve(previous.count()); - QSetIterator it(previous); - while (it.hasNext()) { - const int index = it.next(); + + foreach (int index, previous) { int inc = 0; foreach (const KItemRange& itemRange, itemRanges) { if (index < itemRange.index) { @@ -274,7 +272,7 @@ } } - const QSet selection = selectedItems(); + const KItemSet selection = selectedItems(); if (selection != previousSelection) { emit selectionChanged(selection, previousSelection); } @@ -283,7 +281,7 @@ void KItemListSelectionManager::itemsRemoved(const KItemRangeList& itemRanges) { // Store the current selection (needed in the selectionChanged() signal) - const QSet previousSelection = selectedItems(); + const KItemSet previousSelection = selectedItems(); const int previousCurrent = m_currentItem; // Update the current item @@ -308,19 +306,18 @@ // Update the selections and the anchor item if (!m_selectedItems.isEmpty()) { - const QSet previous = m_selectedItems; + const KItemSet previous = m_selectedItems; m_selectedItems.clear(); - m_selectedItems.reserve(previous.count()); - QSetIterator it(previous); - while (it.hasNext()) { - const int index = indexAfterRangesRemoving(it.next(), itemRanges, DiscardRemovedIndex); + + foreach (int oldIndex, previous) { + const int index = indexAfterRangesRemoving(oldIndex, itemRanges, DiscardRemovedIndex); if (index >= 0) { m_selectedItems.insert(index); } } } - const QSet selection = selectedItems(); + const KItemSet selection = selectedItems(); if (selection != previousSelection) { emit selectionChanged(selection, previousSelection); } @@ -332,7 +329,12 @@ void KItemListSelectionManager::itemsMoved(const KItemRange& itemRange, const QList& movedToIndexes) { // Store the current selection (needed in the selectionChanged() signal) - const QSet previousSelection = selectedItems(); + const KItemSet previousSelection = selectedItems(); + + // endAnchoredSelection() adds all items between m_currentItem and + // m_anchorItem to m_selectedItems. They can then be moved + // individually later in this function. + endAnchoredSelection(); // Update the current item if (m_currentItem >= itemRange.index && m_currentItem < itemRange.index + itemRange.count) { @@ -345,19 +347,15 @@ emit currentChanged(newCurrentItem, previousCurrentItem); } - // Update the anchor item - if (m_anchorItem >= itemRange.index && m_anchorItem < itemRange.index + itemRange.count) { - m_anchorItem = movedToIndexes.at(m_anchorItem - itemRange.index); - } + // Start a new anchored selection. + beginAnchoredSelection(m_currentItem); // Update the selections if (!m_selectedItems.isEmpty()) { - const QSet previous = m_selectedItems; + const KItemSet previous = m_selectedItems; m_selectedItems.clear(); - m_selectedItems.reserve(previous.count()); - QSetIterator it(previous); - while (it.hasNext()) { - const int index = it.next(); + + foreach (int index, previous) { if (index >= itemRange.index && index < itemRange.index + itemRange.count) { m_selectedItems.insert(movedToIndexes.at(index - itemRange.index)); } @@ -367,7 +365,7 @@ } } - const QSet selection = selectedItems(); + const KItemSet selection = selectedItems(); if (selection != previousSelection) { emit selectionChanged(selection, previousSelection); } diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistselectionmanager.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistselectionmanager.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistselectionmanager.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistselectionmanager.h 2014-05-26 15:31:22.000000000 +0000 @@ -26,9 +26,9 @@ #include #include +#include #include -#include class KItemModelBase; @@ -57,8 +57,8 @@ void setCurrentItem(int current); int currentItem() const; - void setSelectedItems(const QSet& items); - QSet selectedItems() const; + void setSelectedItems(const KItemSet& items); + KItemSet selectedItems() const; bool isSelected(int index) const; bool hasSelection() const; @@ -73,7 +73,7 @@ signals: void currentChanged(int current, int previous); - void selectionChanged(const QSet& current, const QSet& previous); + void selectionChanged(const KItemSet& current, const KItemSet& previous); private: void setModel(KItemModelBase* model); @@ -91,7 +91,7 @@ private: int m_currentItem; int m_anchorItem; - QSet m_selectedItems; + KItemSet m_selectedItems; bool m_isAnchoredSelectionActive; KItemModelBase* m_model; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemliststyleoption.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemliststyleoption.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemliststyleoption.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemliststyleoption.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -31,7 +31,8 @@ verticalMargin(-1), iconSize(-1), extendedSelectionRegion(false), - maxTextSize() + maxTextLines(0), + maxTextWidth(0) { } @@ -45,7 +46,8 @@ verticalMargin(other.verticalMargin), iconSize(other.iconSize), extendedSelectionRegion(other.extendedSelectionRegion), - maxTextSize(other.maxTextSize) + maxTextLines(other.maxTextLines), + maxTextWidth(other.maxTextWidth) { } diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemliststyleoption.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemliststyleoption.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemliststyleoption.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemliststyleoption.h 2014-05-26 15:31:22.000000000 +0000 @@ -43,7 +43,8 @@ int verticalMargin; int iconSize; bool extendedSelectionRegion; - QSize maxTextSize; + int maxTextLines; + int maxTextWidth; }; #endif diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistviewaccessible.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistviewaccessible.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistviewaccessible.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistviewaccessible.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -109,7 +109,7 @@ int KItemListViewAccessible::selectedCellCount() const { - return view()->controller()->selectionManager()->selectedItems().size(); + return view()->controller()->selectionManager()->selectedItems().count(); } int KItemListViewAccessible::selectedColumnCount() const diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistview.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistview.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistview.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistview.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -111,8 +111,7 @@ m_sizeHintResolver = new KItemListSizeHintResolver(this); - m_layouter = new KItemListViewLayouter(this); - m_layouter->setSizeHintResolver(m_sizeHintResolver); + m_layouter = new KItemListViewLayouter(m_sizeHintResolver, this); m_animation = new KItemListViewAnimation(this); connect(m_animation, SIGNAL(finished(QGraphicsWidget*,KItemListViewAnimation::AnimationType)), @@ -460,9 +459,9 @@ return m_layouter->lastVisibleIndex(); } -QSizeF KItemListView::itemSizeHint(int index) const +void KItemListView::calculateItemSizeHints(QVector& sizeHints) const { - return widgetCreator()->itemSizeHint(index, this); + widgetCreator()->calculateItemSizeHints(sizeHints, this); } void KItemListView::setSupportsItemExpanding(bool supportsExpanding) @@ -609,12 +608,12 @@ return m_header; } -QPixmap KItemListView::createDragPixmap(const QSet& indexes) const +QPixmap KItemListView::createDragPixmap(const KItemSet& indexes) const { QPixmap pixmap; if (indexes.count() == 1) { - KItemListWidget* item = m_visibleItems.value(indexes.toList().first()); + KItemListWidget* item = m_visibleItems.value(indexes.first()); QGraphicsView* graphicsView = scene()->views()[0]; if (item && graphicsView) { pixmap = item->createDragPixmap(0, graphicsView); @@ -761,7 +760,8 @@ updateGroupHeaderHeight(); } - if (animate && previousOption.maxTextSize != option.maxTextSize) { + if (animate && + (previousOption.maxTextLines != option.maxTextLines || previousOption.maxTextWidth != option.maxTextWidth)) { // Animating a change of the maximum text size just results in expensive // temporary eliding and clipping operations and does not look good visually. animate = false; @@ -894,11 +894,23 @@ bool KItemListView::event(QEvent* event) { - // Forward all events to the controller and handle them there - if (!m_editingRole && m_controller && m_controller->processEvent(event, transform())) { - event->accept(); - return true; + switch (event->type()) { + case QEvent::PaletteChange: + updatePalette(); + break; + + case QEvent::FontChange: + updateFont(); + break; + + default: + // Forward all other events to the controller and handle them there + if (!m_editingRole && m_controller && m_controller->processEvent(event, transform())) { + event->accept(); + return true; + } } + return QGraphicsWidget::event(event); } @@ -951,6 +963,27 @@ return m_visibleItems.values(); } +void KItemListView::updateFont() +{ + if (scene() && !scene()->views().isEmpty()) { + KItemListStyleOption option = styleOption(); + option.font = scene()->views().first()->font(); + option.fontMetrics = QFontMetrics(option.font); + + setStyleOption(option); + } +} + +void KItemListView::updatePalette() +{ + if (scene() && !scene()->views().isEmpty()) { + KItemListStyleOption option = styleOption(); + option.palette = scene()->views().first()->palette(); + + setStyleOption(option); + } +} + void KItemListView::slotItemsInserted(const KItemRangeList& itemRanges) { if (m_itemSize.isEmpty()) { @@ -1233,6 +1266,13 @@ QAccessible::updateAccessibility(this, 0, QAccessible::TableModelChanged); } +void KItemListView::slotGroupsChanged() +{ + updateVisibleGroupHeaders(); + doLayout(NoAnimation); + updateSiblingsInformation(); +} + void KItemListView::slotGroupedSortingChanged(bool current) { m_grouped = current; @@ -1298,7 +1338,7 @@ QAccessible::updateAccessibility(this, current+1, QAccessible::Focus); } -void KItemListView::slotSelectionChanged(const QSet& current, const QSet& previous) +void KItemListView::slotSelectionChanged(const KItemSet& current, const KItemSet& previous) { Q_UNUSED(previous); @@ -1495,7 +1535,7 @@ if (previous) { KItemListSelectionManager* selectionManager = previous->selectionManager(); disconnect(selectionManager, SIGNAL(currentChanged(int,int)), this, SLOT(slotCurrentChanged(int,int))); - disconnect(selectionManager, SIGNAL(selectionChanged(QSet,QSet)), this, SLOT(slotSelectionChanged(QSet,QSet))); + disconnect(selectionManager, SIGNAL(selectionChanged(KItemSet,KItemSet)), this, SLOT(slotSelectionChanged(KItemSet,KItemSet))); } m_controller = controller; @@ -1503,7 +1543,7 @@ if (controller) { KItemListSelectionManager* selectionManager = controller->selectionManager(); connect(selectionManager, SIGNAL(currentChanged(int,int)), this, SLOT(slotCurrentChanged(int,int))); - connect(selectionManager, SIGNAL(selectionChanged(QSet,QSet)), this, SLOT(slotSelectionChanged(QSet,QSet))); + connect(selectionManager, SIGNAL(selectionChanged(KItemSet,KItemSet)), this, SLOT(slotSelectionChanged(KItemSet,KItemSet))); } onControllerChanged(controller, previous); @@ -1527,6 +1567,8 @@ this, SLOT(slotItemsRemoved(KItemRangeList))); disconnect(m_model, SIGNAL(itemsMoved(KItemRange,QList)), this, SLOT(slotItemsMoved(KItemRange,QList))); + disconnect(m_model, SIGNAL(groupsChanged()), + this, SLOT(slotGroupsChanged())); disconnect(m_model, SIGNAL(groupedSortingChanged(bool)), this, SLOT(slotGroupedSortingChanged(bool))); disconnect(m_model, SIGNAL(sortOrderChanged(Qt::SortOrder,Qt::SortOrder)), @@ -1550,6 +1592,8 @@ this, SLOT(slotItemsRemoved(KItemRangeList))); connect(m_model, SIGNAL(itemsMoved(KItemRange,QList)), this, SLOT(slotItemsMoved(KItemRange,QList))); + connect(m_model, SIGNAL(groupsChanged()), + this, SLOT(slotGroupsChanged())); connect(m_model, SIGNAL(groupedSortingChanged(bool)), this, SLOT(slotGroupedSortingChanged(bool))); connect(m_model, SIGNAL(sortOrderChanged(Qt::SortOrder,Qt::SortOrder)), diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistview.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistview.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistview.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistview.h 2014-05-26 15:31:22.000000000 +0000 @@ -194,12 +194,12 @@ int lastVisibleIndex() const; /** - * @return Required size for the item with the index \p index. + * @return Required size for all items in the model. * The returned value might be larger than KItemListView::itemSize(). * In this case the layout grid will be stretched to assure an * unclipped item. */ - QSizeF itemSizeHint(int index) const; + void calculateItemSizeHints(QVector& sizeHints) const; /** * If set to true, items having child-items can be expanded to show the child-items as @@ -271,7 +271,7 @@ * @return Pixmap that is used for a drag operation based on the * items given by \a indexes. */ - virtual QPixmap createDragPixmap(const QSet& indexes) const; + virtual QPixmap createDragPixmap(const KItemSet& indexes) const; /** * Lets the user edit the role \a role for item with the index \a index. @@ -388,18 +388,22 @@ QList visibleItemListWidgets() const; + virtual void updateFont(); + virtual void updatePalette(); + protected slots: virtual void slotItemsInserted(const KItemRangeList& itemRanges); virtual void slotItemsRemoved(const KItemRangeList& itemRanges); virtual void slotItemsMoved(const KItemRange& itemRange, const QList& movedToIndexes); virtual void slotItemsChanged(const KItemRangeList& itemRanges, const QSet& roles); + virtual void slotGroupsChanged(); virtual void slotGroupedSortingChanged(bool current); virtual void slotSortOrderChanged(Qt::SortOrder current, Qt::SortOrder previous); virtual void slotSortRoleChanged(const QByteArray& current, const QByteArray& previous); virtual void slotCurrentChanged(int current, int previous); - virtual void slotSelectionChanged(const QSet& current, const QSet& previous); + virtual void slotSelectionChanged(const KItemSet& current, const KItemSet& previous); private slots: void slotAnimationFinished(QGraphicsWidget* widget, @@ -801,7 +805,7 @@ virtual void recycle(KItemListWidget* widget); - virtual QSizeF itemSizeHint(int index, const KItemListView* view) const = 0; + virtual void calculateItemSizeHints(QVector& sizeHints, const KItemListView* view) const = 0; virtual qreal preferredRoleColumnWidth(const QByteArray& role, int index, @@ -820,7 +824,7 @@ virtual KItemListWidget* create(KItemListView* view); - virtual QSizeF itemSizeHint(int index, const KItemListView* view) const; + virtual void calculateItemSizeHints(QVector& sizeHints, const KItemListView* view) const; virtual qreal preferredRoleColumnWidth(const QByteArray& role, int index, @@ -853,9 +857,9 @@ } template -QSizeF KItemListWidgetCreator::itemSizeHint(int index, const KItemListView* view) const +void KItemListWidgetCreator::calculateItemSizeHints(QVector& sizeHints, const KItemListView* view) const { - return m_informant->itemSizeHint(index, view); + return m_informant->calculateItemSizeHints(sizeHints, view); } template diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistwidget.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistwidget.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistwidget.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistwidget.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -279,6 +279,13 @@ return m_hovered; } +void KItemListWidget::setHoverPosition(const QPointF& pos) +{ + if (m_selectionToggle) { + m_selectionToggle->setHovered(m_selectionToggle->contains(pos)); + } +} + void KItemListWidget::setAlternateBackground(bool enable) { if (m_alternateBackground != enable) { diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistwidget.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistwidget.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemlistwidget.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemlistwidget.h 2014-05-26 15:31:22.000000000 +0000 @@ -49,7 +49,7 @@ KItemListWidgetInformant(); virtual ~KItemListWidgetInformant(); - virtual QSizeF itemSizeHint(int index, const KItemListView* view) const = 0; + virtual void calculateItemSizeHints(QVector& sizeHints, const KItemListView* view) const = 0; virtual qreal preferredRoleColumnWidth(const QByteArray& role, int index, @@ -108,6 +108,8 @@ void setHovered(bool hovered); bool isHovered() const; + void setHoverPosition(const QPointF& pos); + void setAlternateBackground(bool enable); bool alternateBackground() const; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemmodelbase.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemmodelbase.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemmodelbase.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemmodelbase.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -22,17 +22,6 @@ #include "kitemmodelbase.h" -KItemRange::KItemRange(int index, int count) : - index(index), - count(count) -{ -} - -bool KItemRange::operator == (const KItemRange& other) const -{ - return index == other.index && count == other.count; -} - KItemModelBase::KItemModelBase(QObject* parent) : QObject(parent), m_groupedSorting(false), @@ -134,7 +123,7 @@ return 0; } -QMimeData* KItemModelBase::createMimeData(const QSet& indexes) const +QMimeData* KItemModelBase::createMimeData(const KItemSet& indexes) const { Q_UNUSED(indexes); return 0; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemmodelbase.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemmodelbase.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemmodelbase.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemmodelbase.h 2014-05-26 15:31:22.000000000 +0000 @@ -25,23 +25,15 @@ #include +#include +#include + #include #include -#include #include class QMimeData; -struct KItemRange -{ - KItemRange(int index = 0, int count = 0); - int index; - int count; - - bool operator == (const KItemRange& other) const; -}; -typedef QList KItemRangeList; - /** * @brief Base class for model implementations used by KItemListView and KItemListController. * @@ -157,7 +149,7 @@ * caller of this method. The method must be implemented if dragging of * items should be possible. */ - virtual QMimeData* createMimeData(const QSet& indexes) const; + virtual QMimeData* createMimeData(const KItemSet& indexes) const; /** * @return Reimplement this to return the index for the first item @@ -218,11 +210,20 @@ * with the items 5 and 6 then the parameters look like this: * - itemRange: has the index 0 and a count of 7. * - movedToIndexes: Contains the seven values 5, 6, 2, 3, 4, 0, 1 + * + * This signal implies that the groups might have changed. Therefore, + * gropusChanged() is not emitted if this signal is emitted. */ void itemsMoved(const KItemRange& itemRange, const QList& movedToIndexes); void itemsChanged(const KItemRangeList& itemRanges, const QSet& roles); + /** + * Is emitted if the groups have changed, even though the order of the + * items has not been modified. + */ + void groupsChanged(); + void groupedSortingChanged(bool current); void sortRoleChanged(const QByteArray& current, const QByteArray& previous); void sortOrderChanged(Qt::SortOrder current, Qt::SortOrder previous); diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemrange.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemrange.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemrange.h 1970-01-01 00:00:00.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemrange.h 2014-05-26 15:31:22.000000000 +0000 @@ -0,0 +1,98 @@ +/*************************************************************************** + * Copyright (C) 2011 by Peter Penz * + * Copyright (C) 2013 by Frank Reininghaus * + * * + * Based on the Itemviews NG project from Trolltech Labs: * + * http://qt.gitorious.org/qt-labs/itemviews-ng * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#ifndef KITEMRANGE_H +#define KITEMRANGE_H + +#include + +struct KItemRange +{ + KItemRange(int index = 0, int count = 0); + int index; + int count; + + bool operator == (const KItemRange& other) const; +}; + +inline KItemRange::KItemRange(int index, int count) : + index(index), + count(count) +{ +} + +inline bool KItemRange::operator == (const KItemRange& other) const +{ + return index == other.index && count == other.count; +} + + +class KItemRangeList : public QList +{ +public: + KItemRangeList() : QList() {} + KItemRangeList(const QList& list) : QList(list) {} + + template + static KItemRangeList fromSortedContainer(const Container& container); + + KItemRangeList& operator<<(const KItemRange& range) + { + append(range); + return *this; + } +}; + +template +KItemRangeList KItemRangeList::fromSortedContainer(const Container& container) +{ + typename Container::const_iterator it = container.constBegin(); + const typename Container::const_iterator end = container.constEnd(); + + if (it == end) { + return KItemRangeList(); + } + + KItemRangeList result; + + int index = *it; + int count = 1; + + ++it; + + while (it != end) { + if (*it == index + count) { + ++count; + } else { + result << KItemRange(index, count); + index = *it; + count = 1; + } + ++it; + } + + result << KItemRange(index, count); + return result; +} + +#endif diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemset.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemset.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemset.cpp 1970-01-01 00:00:00.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemset.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -0,0 +1,348 @@ +/*************************************************************************** + * Copyright (C) 2013 by Frank Reininghaus * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#include "kitemset.h" + +#include + +#include + +KItemSet::iterator KItemSet::insert(int i) +{ + if (m_itemRanges.empty()) { + m_itemRanges.push_back(KItemRange(i, 1)); + return iterator(m_itemRanges.begin(), 0); + } + + KItemRangeList::iterator rangeBegin = m_itemRanges.begin(); + if (i < rangeBegin->index) { + // The inserted index is smaller than all existing items. + if (i == rangeBegin->index - 1) { + // Move the beginning of the first range one item to the front. + --rangeBegin->index; + ++rangeBegin->count; + } else { + // Insert a new range at the beginning. + rangeBegin = m_itemRanges.insert(rangeBegin, KItemRange(i, 1)); + } + + return iterator(rangeBegin, 0); + } + + KItemRangeList::iterator rangeEnd = m_itemRanges.end(); + KItemRangeList::iterator lastRange = rangeEnd - 1; + if (i >= lastRange->index) { + // i either belongs to the last range, or it is larger than all existing items. + const int lastItemPlus1 = lastRange->index + lastRange->count; + if (i == lastItemPlus1) { + // Move the end of the last range one item to the back. + ++lastRange->count; + } else if (i > lastItemPlus1) { + // Append a new range. + lastRange = m_itemRanges.insert(rangeEnd, KItemRange(i, 1)); + } + + return iterator(lastRange, i - lastRange->index); + } + + // We know that i is between the smallest existing item and the first item + // of the last range. Find the lowest range whose 'index' is smaller than i. + KItemRangeList::iterator low = rangeBegin; + KItemRangeList::iterator high = lastRange; + + while (low + 1 != high) { + const int span = high - low; + Q_ASSERT(span >= 2); + + KItemRangeList::iterator mid = low + span / 2; + if (mid->index > i) { + high = mid; + } else { + low = mid; + } + } + + Q_ASSERT(low->index <= i && high->index > i); + + if (i == low->index + low->count) { + // i is just one item behind the range low. + if (i == high->index - 1) { + // i closes the gap between low and high. Merge the two ranges. + const int newRangeCount = low->count + 1 + high->count; + KItemRangeList::iterator behindNewRange = m_itemRanges.erase(high); + KItemRangeList::iterator newRange = behindNewRange - 1; + newRange->count = newRangeCount; + return iterator(newRange, i - newRange->index); + } else { + // Extend low by one item. + ++low->count; + return iterator(low, low->count - 1); + } + } else if (i > low->index + low->count) { + if (i == high->index - 1) { + // Extend high by one item to the front. + --high->index; + ++high->count; + return iterator(high, 0); + } else { + // Insert a new range between low and high. + KItemRangeList::iterator newRange = m_itemRanges.insert(high, KItemRange(i, 1)); + return iterator(newRange, 0); + } + } else { + // The range low already contains i. + return iterator(low, i - low->index); + } +} + +KItemSet::iterator KItemSet::erase(iterator it) +{ + KItemRangeList::iterator rangeIt = it.m_rangeIt; + + if (it.m_offset == 0) { + // Removed index is at the beginning of a range. + if (rangeIt->count > 1) { + ++rangeIt->index; + --rangeIt->count; + } else { + // The range only contains the removed index. + rangeIt = m_itemRanges.erase(rangeIt); + } + return iterator(rangeIt, 0); + } else if (it.m_offset == rangeIt->count - 1) { + // Removed index is at the end of a range. + --rangeIt->count; + ++rangeIt; + return iterator(rangeIt, 0); + } else { + // The removed index is in the middle of a range. + const int newRangeIndex = *it + 1; + const int newRangeCount = rangeIt->count - it.m_offset - 1; + const KItemRange newRange(newRangeIndex, newRangeCount); + + rangeIt->count = it.m_offset; + ++rangeIt; + rangeIt = m_itemRanges.insert(rangeIt, newRange); + + return iterator(rangeIt, 0); + } +} + +KItemSet KItemSet::operator+(const KItemSet& other) const +{ + KItemSet sum; + + KItemRangeList::const_iterator it1 = m_itemRanges.constBegin(); + KItemRangeList::const_iterator it2 = other.m_itemRanges.constBegin(); + + const KItemRangeList::const_iterator end1 = m_itemRanges.constEnd(); + const KItemRangeList::const_iterator end2 = other.m_itemRanges.constEnd(); + + while (it1 != end1 || it2 != end2) { + if (it1 == end1) { + // We are past the end of 'this' already. Append all remaining + // item ranges from 'other'. + while (it2 != end2) { + sum.m_itemRanges.append(*it2); + ++it2; + } + } else if (it2 == end2) { + // We are past the end of 'other' already. Append all remaining + // item ranges from 'this'. + while (it1 != end1) { + sum.m_itemRanges.append(*it1); + ++it1; + } + } else { + // Find the beginning of the next range. + int index = qMin(it1->index, it2->index); + int count = 0; + + do { + if (it1 != end1 && it1->index <= index + count) { + // The next range from 'this' overlaps with the current range in the sum. + count = qMax(count, it1->index + it1->count - index); + ++it1; + } + + if (it2 != end2 && it2->index <= index + count) { + // The next range from 'other' overlaps with the current range in the sum. + count = qMax(count, it2->index + it2->count - index); + ++it2; + } + } while ((it1 != end1 && it1->index <= index + count) + || (it2 != end2 && it2->index <= index + count)); + + sum.m_itemRanges.append(KItemRange(index, count)); + } + } + + return sum; +} + +KItemSet KItemSet::operator^(const KItemSet& other) const +{ + // We are looking for all ints which are either in *this or in other, + // but not in both. + KItemSet result; + + // When we go through all integers from INT_MIN to INT_MAX and start + // in the state "do not add to result", every beginning/end of a range + // of *this and other toggles the "add/do not add to result" state. + // Therefore, we just have to put ints where any range starts/ends to + // a sorted array, and then we can calculate the result quite easily. + QVector rangeBoundaries; + rangeBoundaries.resize(2 * (m_itemRanges.count() + other.m_itemRanges.count())); + const QVector::iterator begin = rangeBoundaries.begin(); + const QVector::iterator end = rangeBoundaries.end(); + QVector::iterator it = begin; + + foreach (const KItemRange& range, m_itemRanges) { + *it++ = range.index; + *it++ = range.index + range.count; + } + + const QVector::iterator middle = it; + + foreach (const KItemRange& range, other.m_itemRanges) { + *it++ = range.index; + *it++ = range.index + range.count; + } + Q_ASSERT(it == end); + + std::inplace_merge(begin, middle, end); + + it = begin; + while (it != end) { + const int rangeBegin = *it; + ++it; + + if (*it == rangeBegin) { + // It seems that ranges from both *this and other start at + // rangeBegin. Do not start a new range, but read the next int. + // + // Example: Consider the symmetric difference of the sets + // {1, 2, 3, 4} and {1, 2}. The sorted list of range boundaries is + // 1 1 3 5. Discarding the duplicate 1 yields the result + // rangeBegin = 3, rangeEnd = 5, which corresponds to the set {3, 4}. + ++it; + } else { + // The end of the current range is the next *single* int that we + // find. If an int appears twice in rangeBoundaries, the range does + // not end. + // + // Example: Consider the symmetric difference of the sets + // {1, 2, 3, 4, 8, 9, 10} and {5, 6, 7}. The sorted list of range + // boundaries is 1 5 5 8 8 11, and discarding all duplicates yields + // the result rangeBegin = 1, rangeEnd = 11, which corresponds to + // the set {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. + bool foundEndOfRange = false; + int rangeEnd; + do { + rangeEnd = *it; + ++it; + + if (it == end || *it != rangeEnd) { + foundEndOfRange = true; + } else { + ++it; + } + } while (!foundEndOfRange); + + result.m_itemRanges.append(KItemRange(rangeBegin, rangeEnd - rangeBegin)); + } + } + + return result; +} + +bool KItemSet::isValid() const +{ + const KItemRangeList::const_iterator begin = m_itemRanges.constBegin(); + const KItemRangeList::const_iterator end = m_itemRanges.constEnd(); + + for (KItemRangeList::const_iterator it = begin; it != end; ++it) { + if (it->count <= 0) { + return false; + } + + if (it != begin) { + const KItemRangeList::const_iterator previous = it - 1; + if (previous->index + previous->count >= it->index) { + return false; + } + } + } + + return true; +} + +KItemRangeList::iterator KItemSet::rangeForItem(int i) +{ + const KItemRangeList::iterator end = m_itemRanges.end(); + KItemRangeList::iterator low = m_itemRanges.begin(); + KItemRangeList::iterator high = end; + + if (low == end || low->index > i) { + return end; + } + + while (low != high && low + 1 != high) { + KItemRangeList::iterator mid = low + (high - low) / 2; + if (mid->index > i) { + high = mid; + } else { + low = mid; + } + } + + Q_ASSERT(low->index <= i); + if (low->index + low->count > i) { + return low; + } + + return end; +} + +KItemRangeList::const_iterator KItemSet::constRangeForItem(int i) const +{ + const KItemRangeList::const_iterator end = m_itemRanges.constEnd(); + KItemRangeList::const_iterator low = m_itemRanges.constBegin(); + KItemRangeList::const_iterator high = end; + + if (low == end || low->index > i) { + return end; + } + + while (low != high && low + 1 != high) { + KItemRangeList::const_iterator mid = low + (high - low) / 2; + if (mid->index > i) { + high = mid; + } else { + low = mid; + } + } + + Q_ASSERT(low->index <= i); + if (low->index + low->count > i) { + return low; + } + + return end; +} diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemset.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemset.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kitemset.h 1970-01-01 00:00:00.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kitemset.h 2014-05-26 15:31:22.000000000 +0000 @@ -0,0 +1,413 @@ +/*************************************************************************** + * Copyright (C) 2013 by Frank Reininghaus * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#ifndef KITEMSET_H +#define KITEMSET_H + +#include + +/** + * @brief Stores a set of integer numbers in a space-efficient way. + * + * This class is similar to QSet, but it has the following advantages: + * + * 1. It uses less memory than a QSet if many consecutive numbers are + * stored. This is achieved by not storing each number separately, but + * "ranges" of numbers. + * + * Example: The set {1, 2, 3, 4, 5} is represented by a single range which + * starts at 1 and has the length 5. + * + * 2. When iterating through a KItemSet using KItemSet::iterator or + * KItemSet::const_iterator, the numbers are traversed in ascending order. + * + * The complexity of most operations depends on the number of ranges. + */ + +class KItemSet +{ +public: + KItemSet(); + KItemSet(const KItemSet& other); + + /** + * Returns the number of items in the set. + * Complexity: O(log(number of ranges)). + */ + int count() const; + + bool isEmpty() const; + void clear(); + + bool operator==(const KItemSet& other) const; + bool operator!=(const KItemSet& other) const; + + class iterator + { + iterator(const KItemRangeList::iterator& rangeIt, int offset) : + m_rangeIt(rangeIt), + m_offset(offset) + { + } + + public: + iterator(const iterator& other) : + m_rangeIt(other.m_rangeIt), + m_offset(other.m_offset) + { + } + + iterator& operator=(const iterator& other) + { + m_rangeIt = other.m_rangeIt; + m_offset = other.m_offset; + return *this; + } + + int operator*() const + { + return m_rangeIt->index + m_offset; + } + + inline bool operator==(const iterator& other) const + { + return m_rangeIt == other.m_rangeIt && m_offset == other.m_offset; + } + + inline bool operator!=(const iterator& other) const + { + return !(*this == other); + } + + inline iterator& operator++() + { + ++m_offset; + + if (m_offset == m_rangeIt->count) { + ++m_rangeIt; + m_offset = 0; + } + + return *this; + } + + inline iterator operator++(int) + { + iterator r = *this; + ++(*this); + return r; + } + + inline iterator& operator--() + { + if (m_offset == 0) { + --m_rangeIt; + m_offset = m_rangeIt->count - 1; + } else { + --m_offset; + } + + return *this; + } + + inline iterator operator--(int) + { + iterator r = *this; + --(*this); + return r; + } + + private: + KItemRangeList::iterator m_rangeIt; + int m_offset; + + friend class const_iterator; + friend class KItemSet; + }; + + + class const_iterator + { + const_iterator(KItemRangeList::const_iterator rangeIt, int offset) : + m_rangeIt(rangeIt), + m_offset(offset) + { + } + + public: + const_iterator(const const_iterator& other) : + m_rangeIt(other.m_rangeIt), + m_offset(other.m_offset) + { + } + + const_iterator(const iterator& other) : + m_rangeIt(other.m_rangeIt), + m_offset(other.m_offset) + { + } + + const_iterator& operator=(const const_iterator& other) + { + m_rangeIt = other.m_rangeIt; + m_offset = other.m_offset; + return *this; + } + + int operator*() const + { + return m_rangeIt->index + m_offset; + } + + inline bool operator==(const const_iterator& other) const + { + return m_rangeIt == other.m_rangeIt && m_offset == other.m_offset; + } + + inline bool operator!=(const const_iterator& other) const + { + return !(*this == other); + } + + inline const_iterator& operator++() + { + ++m_offset; + + if (m_offset == m_rangeIt->count) { + ++m_rangeIt; + m_offset = 0; + } + + return *this; + } + + inline const_iterator operator++(int) + { + const_iterator r = *this; + ++(*this); + return r; + } + + inline const_iterator& operator--() + { + if (m_offset == 0) { + --m_rangeIt; + m_offset = m_rangeIt->count - 1; + } else { + --m_offset; + } + + return *this; + } + + inline const_iterator operator--(int) + { + const_iterator r = *this; + --(*this); + return r; + } + + private: + KItemRangeList::const_iterator m_rangeIt; + int m_offset; + + friend class KItemSet; + }; + + iterator begin(); + const_iterator begin() const; + const_iterator constBegin() const; + iterator end(); + const_iterator end() const; + const_iterator constEnd() const; + + int first() const; + int last() const; + + bool contains(int i) const; + iterator insert(int i); + iterator find(int i); + const_iterator constFind(int i) const; + bool remove(int i); + iterator erase(iterator it); + + /** + * Returns a new set which contains all items that are contained in this + * KItemSet, in \a other, or in both. + */ + KItemSet operator+(const KItemSet& other) const; + + /** + * Returns a new set which contains all items that are contained either in + * this KItemSet, or in \a other, but not in both (the symmetric difference + * of both KItemSets). + */ + KItemSet operator^(const KItemSet& other) const; + + KItemSet& operator<<(int i); + +private: + /** + * Returns true if the KItemSet is valid, and false otherwise. + * A valid KItemSet must store the item ranges in ascending order, and + * the ranges must not overlap. + */ + bool isValid() const; + + /** + * This function returns an iterator that points to the KItemRange which + * contains i, or m_itemRanges.end() if no such range exists. + */ + KItemRangeList::iterator rangeForItem(int i); + + /** + * This function returns an iterator that points to the KItemRange which + * contains i, or m_itemRanges.constEnd() if no such range exists. + */ + KItemRangeList::const_iterator constRangeForItem(int i) const; + + KItemRangeList m_itemRanges; + + friend class KItemSetTest; +}; + +inline KItemSet::KItemSet() : + m_itemRanges() +{ +} + +inline KItemSet::KItemSet(const KItemSet& other) : + m_itemRanges(other.m_itemRanges) +{ +} + +inline int KItemSet::count() const +{ + int result = 0; + foreach (const KItemRange& range, m_itemRanges) { + result += range.count; + } + return result; +} + +inline bool KItemSet::isEmpty() const +{ + return m_itemRanges.isEmpty(); +} + +inline void KItemSet::clear() +{ + m_itemRanges.clear(); +} + +inline bool KItemSet::operator==(const KItemSet& other) const +{ + return m_itemRanges == other.m_itemRanges; +} + +inline bool KItemSet::operator!=(const KItemSet& other) const +{ + return m_itemRanges != other.m_itemRanges; +} + +inline bool KItemSet::contains(int i) const +{ + const KItemRangeList::const_iterator it = constRangeForItem(i); + return it != m_itemRanges.end(); +} + +inline KItemSet::iterator KItemSet::find(int i) +{ + const KItemRangeList::iterator it = rangeForItem(i); + if (it != m_itemRanges.end()) { + return iterator(it, i - it->index); + } else { + return end(); + } +} + +inline KItemSet::const_iterator KItemSet::constFind(int i) const +{ + const KItemRangeList::const_iterator it = constRangeForItem(i); + if (it != m_itemRanges.constEnd()) { + return const_iterator(it, i - it->index); + } else { + return constEnd(); + } +} + +inline bool KItemSet::remove(int i) +{ + iterator it = find(i); + if (it != end()) { + erase(it); + return true; + } else { + return false; + } +} + +inline KItemSet::iterator KItemSet::begin() +{ + return iterator(m_itemRanges.begin(), 0); +} + +inline KItemSet::const_iterator KItemSet::begin() const +{ + return const_iterator(m_itemRanges.begin(), 0); +} + +inline KItemSet::const_iterator KItemSet::constBegin() const +{ + return const_iterator(m_itemRanges.constBegin(), 0); +} + +inline KItemSet::iterator KItemSet::end() +{ + return iterator(m_itemRanges.end(), 0); +} + +inline KItemSet::const_iterator KItemSet::end() const +{ + return const_iterator(m_itemRanges.end(), 0); +} + +inline KItemSet::const_iterator KItemSet::constEnd() const +{ + return const_iterator(m_itemRanges.constEnd(), 0); +} + +inline int KItemSet::first() const +{ + return m_itemRanges.first().index; +} + +inline int KItemSet::last() const +{ + const KItemRange& lastRange = m_itemRanges.last(); + return lastRange.index + lastRange.count - 1; +} + +inline KItemSet& KItemSet::operator<<(int i) +{ + insert(i); + return *this; +} + +#endif diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kstandarditemlistview.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kstandarditemlistview.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kstandarditemlistview.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kstandarditemlistview.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -48,23 +48,8 @@ const ItemLayout previous = m_itemLayout; m_itemLayout = layout; - switch (layout) { - case IconsLayout: - setScrollOrientation(Qt::Vertical); - setSupportsItemExpanding(false); - break; - case DetailsLayout: - setScrollOrientation(Qt::Vertical); - setSupportsItemExpanding(true); - break; - case CompactLayout: - setScrollOrientation(Qt::Horizontal); - setSupportsItemExpanding(false); - break; - default: - Q_ASSERT(false); - break; - } + setSupportsItemExpanding(itemLayoutSupportsItemExpanding(layout)); + setScrollOrientation(layout == CompactLayout ? Qt::Horizontal : Qt::Vertical); onItemLayoutChanged(layout, previous); @@ -117,6 +102,11 @@ return false; } +bool KStandardItemListView::itemLayoutSupportsItemExpanding(ItemLayout layout) const +{ + return layout == DetailsLayout; +} + void KStandardItemListView::onItemLayoutChanged(ItemLayout current, ItemLayout previous) { Q_UNUSED(current); diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kstandarditemlistview.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kstandarditemlistview.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kstandarditemlistview.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kstandarditemlistview.h 2014-05-26 15:31:22.000000000 +0000 @@ -63,6 +63,7 @@ virtual KItemListGroupHeaderCreatorBase* defaultGroupHeaderCreator() const; virtual void initializeItemListWidget(KItemListWidget* item); virtual bool itemSizeHintUpdateRequired(const QSet& changedRoles) const; + virtual bool itemLayoutSupportsItemExpanding(ItemLayout layout) const; virtual void onItemLayoutChanged(ItemLayout current, ItemLayout previous); virtual void onScrollOrientationChanged(Qt::Orientation current, Qt::Orientation previous); virtual void onSupportsItemExpandingChanged(bool supportsExpanding); diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kstandarditemlistwidget.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kstandarditemlistwidget.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kstandarditemlistwidget.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kstandarditemlistwidget.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -55,77 +55,25 @@ { } -QSizeF KStandardItemListWidgetInformant::itemSizeHint(int index, const KItemListView* view) const +void KStandardItemListWidgetInformant::calculateItemSizeHints(QVector& sizeHints, const KItemListView* view) const { - const QHash values = view->model()->data(index); - const KItemListStyleOption& option = view->styleOption(); - const int additionalRolesCount = qMax(view->visibleRoles().count() - 1, 0); - switch (static_cast(view)->itemLayout()) { - case KStandardItemListWidget::IconsLayout: { - const QString text = KStringHandler::preProcessWrap(values["text"].toString()); - - const qreal itemWidth = view->itemSize().width(); - const qreal maxWidth = itemWidth - 2 * option.padding; - QTextLine line; - - // Calculate the number of lines required for wrapping the name - QTextOption textOption(Qt::AlignHCenter); - textOption.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere); - - qreal textHeight = 0; - QTextLayout layout(text, option.font); - layout.setTextOption(textOption); - layout.beginLayout(); - while ((line = layout.createLine()).isValid()) { - line.setLineWidth(maxWidth); - line.naturalTextWidth(); - textHeight += line.height(); - } - layout.endLayout(); - - // Add one line for each additional information - textHeight += additionalRolesCount * option.fontMetrics.lineSpacing(); - - const qreal maxTextHeight = option.maxTextSize.height(); - if (maxTextHeight > 0 && textHeight > maxTextHeight) { - textHeight = maxTextHeight; - } - - return QSizeF(itemWidth, textHeight + option.iconSize + option.padding * 3); - } - - case KStandardItemListWidget::CompactLayout: { - // For each row exactly one role is shown. Calculate the maximum required width that is necessary - // to show all roles without horizontal clipping. - qreal maximumRequiredWidth = 0.0; - - foreach (const QByteArray& role, view->visibleRoles()) { - const QString text = roleText(role, values); - const qreal requiredWidth = option.fontMetrics.width(text); - maximumRequiredWidth = qMax(maximumRequiredWidth, requiredWidth); - } + case KStandardItemListWidget::IconsLayout: + calculateIconsLayoutItemSizeHints(sizeHints, view); + break; - qreal width = option.padding * 4 + option.iconSize + maximumRequiredWidth; - const qreal maxWidth = option.maxTextSize.width(); - if (maxWidth > 0 && width > maxWidth) { - width = maxWidth; - } - const qreal height = option.padding * 2 + qMax(option.iconSize, (1 + additionalRolesCount) * option.fontMetrics.lineSpacing()); - return QSizeF(width, height); - } + case KStandardItemListWidget::CompactLayout: + calculateCompactLayoutItemSizeHints(sizeHints, view); + break; - case KStandardItemListWidget::DetailsLayout: { - const qreal height = option.padding * 2 + qMax(option.iconSize, option.fontMetrics.height()); - return QSizeF(-1, height); - } + case KStandardItemListWidget::DetailsLayout: + calculateDetailsLayoutItemSizeHints(sizeHints, view); + break; default: Q_ASSERT(false); break; } - - return QSize(); } qreal KStandardItemListWidgetInformant::preferredRoleColumnWidth(const QByteArray& role, @@ -138,16 +86,22 @@ const QString text = roleText(role, values); qreal width = KStandardItemListWidget::columnPadding(option); + const QFontMetrics& normalFontMetrics = option.fontMetrics; + const QFontMetrics linkFontMetrics(customizedFontForLinks(option.font)); + if (role == "rating") { width += KStandardItemListWidget::preferredRatingSize(option).width(); } else { - width += option.fontMetrics.width(text); + // If current item is a link, we use the customized link font metrics instead of the normal font metrics. + const QFontMetrics& fontMetrics = itemIsLink(index, view) ? linkFontMetrics : normalFontMetrics; + + width += fontMetrics.width(text); if (role == "text") { if (view->supportsItemExpanding()) { // Increase the width by the expansion-toggle and the current expansion level const int expandedParentsCount = values.value("expandedParentsCount", 0).toInt(); - const qreal height = option.padding * 2 + qMax(option.iconSize, option.fontMetrics.height()); + const qreal height = option.padding * 2 + qMax(option.iconSize, fontMetrics.height()); width += (expandedParentsCount + 1) * height; } @@ -159,6 +113,16 @@ return width; } +QString KStandardItemListWidgetInformant::itemText(int index, const KItemListView* view) const +{ + return view->model()->data(index).value("text").toString(); +} + +bool KStandardItemListWidgetInformant::itemIsLink(int index, const KItemListView* view) const +{ + return false; +} + QString KStandardItemListWidgetInformant::roleText(const QByteArray& role, const QHash& values) const { @@ -169,6 +133,123 @@ return values.value(role).toString(); } +QFont KStandardItemListWidgetInformant::customizedFontForLinks(const QFont& baseFont) const +{ + return baseFont; +} + +void KStandardItemListWidgetInformant::calculateIconsLayoutItemSizeHints(QVector& sizeHints, const KItemListView* view) const +{ + const KItemListStyleOption& option = view->styleOption(); + const QFont& normalFont = option.font; + const int additionalRolesCount = qMax(view->visibleRoles().count() - 1, 0); + + const qreal itemWidth = view->itemSize().width(); + const qreal maxWidth = itemWidth - 2 * option.padding; + const qreal additionalRolesSpacing = additionalRolesCount * option.fontMetrics.lineSpacing(); + const qreal spacingAndIconHeight = option.iconSize + option.padding * 3; + + const QFont linkFont = customizedFontForLinks(normalFont); + + QTextOption textOption(Qt::AlignHCenter); + textOption.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere); + + for (int index = 0; index < sizeHints.count(); ++index) { + if (!sizeHints.at(index).isEmpty()) { + continue; + } + + // If the current item is a link, we use the customized link font instead of the normal font. + const QFont& font = itemIsLink(index, view) ? linkFont : normalFont; + + const QString& text = KStringHandler::preProcessWrap(itemText(index, view)); + + // Calculate the number of lines required for wrapping the name + qreal textHeight = 0; + QTextLayout layout(text, font); + layout.setTextOption(textOption); + layout.beginLayout(); + QTextLine line; + int lineCount = 0; + while ((line = layout.createLine()).isValid()) { + line.setLineWidth(maxWidth); + line.naturalTextWidth(); + textHeight += line.height(); + + ++lineCount; + if (lineCount == option.maxTextLines) { + break; + } + } + layout.endLayout(); + + // Add one line for each additional information + textHeight += additionalRolesSpacing; + + sizeHints[index] = QSizeF(itemWidth, textHeight + spacingAndIconHeight); + } +} + +void KStandardItemListWidgetInformant::calculateCompactLayoutItemSizeHints(QVector& sizeHints, const KItemListView* view) const +{ + const KItemListStyleOption& option = view->styleOption(); + const QFontMetrics& normalFontMetrics = option.fontMetrics; + const int additionalRolesCount = qMax(view->visibleRoles().count() - 1, 0); + + const QList& visibleRoles = view->visibleRoles(); + const bool showOnlyTextRole = (visibleRoles.count() == 1) && (visibleRoles.first() == "text"); + const qreal maxWidth = option.maxTextWidth; + const qreal paddingAndIconWidth = option.padding * 4 + option.iconSize; + const qreal height = option.padding * 2 + qMax(option.iconSize, (1 + additionalRolesCount) * normalFontMetrics.lineSpacing()); + + const QFontMetrics linkFontMetrics(customizedFontForLinks(option.font)); + + for (int index = 0; index < sizeHints.count(); ++index) { + if (!sizeHints.at(index).isEmpty()) { + continue; + } + + // If the current item is a link, we use the customized link font metrics instead of the normal font metrics. + const QFontMetrics& fontMetrics = itemIsLink(index, view) ? linkFontMetrics : normalFontMetrics; + + // For each row exactly one role is shown. Calculate the maximum required width that is necessary + // to show all roles without horizontal clipping. + qreal maximumRequiredWidth = 0.0; + + if (showOnlyTextRole) { + maximumRequiredWidth = fontMetrics.width(itemText(index, view)); + } else { + const QHash& values = view->model()->data(index); + foreach (const QByteArray& role, visibleRoles) { + const QString& text = roleText(role, values); + const qreal requiredWidth = fontMetrics.width(text); + maximumRequiredWidth = qMax(maximumRequiredWidth, requiredWidth); + } + } + + qreal width = paddingAndIconWidth + maximumRequiredWidth; + if (maxWidth > 0 && width > maxWidth) { + width = maxWidth; + } + + sizeHints[index] = QSizeF(width, height); + } +} + +void KStandardItemListWidgetInformant::calculateDetailsLayoutItemSizeHints(QVector& sizeHints, const KItemListView* view) const +{ + const KItemListStyleOption& option = view->styleOption(); + const qreal height = option.padding * 2 + qMax(option.iconSize, option.fontMetrics.height()); + + for (int index = 0; index < sizeHints.count(); ++index) { + if (!sizeHints.at(index).isEmpty()) { + continue; + } + + sizeHints[index] = QSizeF(-1, height); + } +} + KStandardItemListWidget::KStandardItemListWidget(KItemListWidgetInformant* informant, QGraphicsItem* parent) : KItemListWidget(informant, parent), m_isCut(false), @@ -577,6 +658,12 @@ dirtyRoles = roles; } + // The URL might have changed (i.e., if the sort order of the items has + // been changed). Therefore, the "is cut" state must be updated. + KFileItemClipboard* clipboard = KFileItemClipboard::instance(); + const KUrl itemUrl = data().value("url").value(); + m_isCut = clipboard->isCut(itemUrl); + // The icon-state might depend from other roles and hence is // marked as dirty whenever a role has been changed dirtyRoles.insert("iconPixmap"); @@ -797,11 +884,12 @@ const QHash values = data(); const int expandedParentsCount = values.value("expandedParentsCount", 0).toInt(); if (expandedParentsCount >= 0) { + const KItemListStyleOption& option = styleOption(); const qreal widgetHeight = size().height(); - const qreal inc = (widgetHeight - KIconLoader::SizeSmall) / 2; + const qreal inc = (widgetHeight - option.iconSize) / 2; const qreal x = expandedParentsCount * widgetHeight + inc; const qreal y = inc; - m_expansionArea = QRectF(x, y, KIconLoader::SizeSmall, KIconLoader::SizeSmall); + m_expansionArea = QRectF(x, y, option.iconSize, option.iconSize); return; } } @@ -1011,9 +1099,6 @@ qreal nameHeight = 0; QTextLine line; - const int additionalRolesCount = qMax(visibleRoles().count() - 1, 0); - const int maxNameLines = (option.maxTextSize.height() / int(lineSpacing)) - additionalRolesCount; - QTextLayout layout(nameTextInfo->staticText.text(), m_customizedFont); layout.setTextOption(nameTextInfo->staticText.textOption()); layout.beginLayout(); @@ -1024,7 +1109,7 @@ nameHeight += line.height(); ++nameLineIndex; - if (nameLineIndex == maxNameLines) { + if (nameLineIndex == option.maxTextLines) { // The maximum number of textlines has been reached. If this is // the case provide an elided text if necessary. const int textLength = line.textStart() + line.textLength(); @@ -1046,6 +1131,7 @@ layout.endLayout(); // Use one line for each additional information + const int additionalRolesCount = qMax(visibleRoles().count() - 1, 0); nameTextInfo->staticText.setTextWidth(maxWidth); nameTextInfo->pos = QPointF(padding, widgetHeight - nameHeight - diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kstandarditemlistwidget.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kstandarditemlistwidget.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kstandarditemlistwidget.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kstandarditemlistwidget.h 2014-05-26 15:31:22.000000000 +0000 @@ -38,13 +38,29 @@ KStandardItemListWidgetInformant(); virtual ~KStandardItemListWidgetInformant(); - virtual QSizeF itemSizeHint(int index, const KItemListView* view) const; + virtual void calculateItemSizeHints(QVector& sizeHints, const KItemListView* view) const; virtual qreal preferredRoleColumnWidth(const QByteArray& role, int index, const KItemListView* view) const; protected: /** + * @return The value of the "text" role. The default implementation returns + * view->model()->data(index)["text"]. If a derived class can + * prevent the (possibly expensive) construction of the + * QHash returned by KItemModelBase::data(int), + * it can reimplement this function. + */ + virtual QString itemText(int index, const KItemListView* view) const; + + /** + * @return The value of the "isLink" role. The default implementation returns false. + * The derived class should reimplement this function, when information about + * links is available and in usage. + */ + virtual bool itemIsLink(int index, const KItemListView* view) const; + + /** * @return String representation of the role \a role. The representation of * a role might depend on other roles, so the values of all roles * are passed as parameter. @@ -52,6 +68,15 @@ virtual QString roleText(const QByteArray& role, const QHash& values) const; + /** + * @return A font based on baseFont which is customized for symlinks. + */ + virtual QFont customizedFontForLinks(const QFont& baseFont) const; + + void calculateIconsLayoutItemSizeHints(QVector& sizeHints, const KItemListView* view) const; + void calculateCompactLayoutItemSizeHints(QVector& sizeHints, const KItemListView* view) const; + void calculateDetailsLayoutItemSizeHints(QVector& sizeHints, const KItemListView* view) const; + friend class KStandardItemListWidget; // Accesses roleText() }; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kstandarditemmodel.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kstandarditemmodel.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kstandarditemmodel.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kstandarditemmodel.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -175,7 +175,7 @@ return true; } -QMimeData* KStandardItemModel::createMimeData(const QSet& indexes) const +QMimeData* KStandardItemModel::createMimeData(const KItemSet& indexes) const { Q_UNUSED(indexes); return 0; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kstandarditemmodel.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kstandarditemmodel.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/kstandarditemmodel.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/kstandarditemmodel.h 2014-05-26 15:31:22.000000000 +0000 @@ -72,7 +72,7 @@ virtual int count() const; virtual QHash data(int index) const; virtual bool setData(int index, const QHash& values); - virtual QMimeData* createMimeData(const QSet& indexes) const; + virtual QMimeData* createMimeData(const KItemSet& indexes) const; virtual int indexForKeyboardSearch(const QString& text, int startFromIndex = 0) const; virtual bool supportsDropping(int index) const; virtual QString roleDescription(const QByteArray& role) const; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kbaloorolesprovider.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kbaloorolesprovider.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kbaloorolesprovider.cpp 1970-01-01 00:00:00.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kbaloorolesprovider.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -0,0 +1,184 @@ +/*************************************************************************** + * Copyright (C) 2012 by Peter Penz * + * Copyright (C) 2013 by Vishesh Handa * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#include "kbaloorolesprovider.h" + +#include +#include +#include + +#include +#include + +#include +#include + +struct KBalooRolesProviderSingleton +{ + KBalooRolesProvider instance; +}; +K_GLOBAL_STATIC(KBalooRolesProviderSingleton, s_balooRolesProvider) + + +KBalooRolesProvider& KBalooRolesProvider::instance() +{ + return s_balooRolesProvider->instance; +} + +KBalooRolesProvider::~KBalooRolesProvider() +{ +} + +QSet KBalooRolesProvider::roles() const +{ + return m_roles; +} + +QHash KBalooRolesProvider::roleValues(const Baloo::File& file, + const QSet& roles) const +{ + QHash values; + + int width = -1; + int height = -1; + + QMapIterator it(file.properties()); + while (it.hasNext()) { + it.next(); + + const KFileMetaData::PropertyInfo pi(it.key()); + const QString property = pi.name(); + const QByteArray role = roleForProperty(property); + if (role.isEmpty() || !roles.contains(role)) { + continue; + } + + const QVariant value = it.value(); + + if (role == "imageSize") { + // Merge the two properties for width and height + // as one string into the "imageSize" role + if (property == QLatin1String("width")) { + width = value.toInt(); + } + else if (property == QLatin1String("height")) { + height = value.toInt(); + } + + if (width >= 0 && height >= 0) { + QString widthAndHeight = QString::number(width); + widthAndHeight += QLatin1String(" x "); + widthAndHeight += QString::number(height); + values.insert(role, widthAndHeight); + } + } else if (role == "orientation") { + const QString orientation = orientationFromValue(value.toInt()); + values.insert(role, orientation); + } else if (role == "duration") { + const QString duration = durationFromValue(value.toInt()); + values.insert(role, duration); + } else { + values.insert(role, value.toString()); + } + } + + if (roles.contains("tags")) { + values.insert("tags", tagsFromValues(file.tags())); + } + if (roles.contains("rating")) { + values.insert("rating", QString::number(file.rating())); + } + if (roles.contains("comment")) { + values.insert("comment", file.userComment()); + } + + return values; +} + +QByteArray KBalooRolesProvider::roleForProperty(const QString& property) const +{ + return m_roleForProperty.value(property); +} + +KBalooRolesProvider::KBalooRolesProvider() : + m_roles(), + m_roleForProperty() +{ + struct PropertyInfo + { + const char* const property; + const char* const role; + }; + + // Mapping from the URIs to the KFileItemModel roles. Note that this must not be + // a 1:1 mapping: One role may contain several URI-values (e.g. the URIs for height and + // width of an image are mapped to the role "imageSize") + static const PropertyInfo propertyInfoList[] = { + { "rating", "rating" }, + { "tag", "tags" }, + { "comment", "comment" }, + { "wordCount", "wordCount" }, + { "lineCount", "lineCount" }, + { "width", "imageSize" }, + { "height", "imageSize" }, + { "nexif.orientation", "orientation", }, + { "artist", "artist" }, + { "album", "album" }, + { "duration", "duration" }, + { "trackNumber", "track" } + // { "http://www.semanticdesktop.org/ontologies/2010/04/30/ndo#copiedFrom", "copiedFrom" } + }; + + for (unsigned int i = 0; i < sizeof(propertyInfoList) / sizeof(PropertyInfo); ++i) { + m_roleForProperty.insert(propertyInfoList[i].property, propertyInfoList[i].role); + m_roles.insert(propertyInfoList[i].role); + } +} + +QString KBalooRolesProvider::tagsFromValues(const QStringList& values) const +{ + return values.join(", "); +} + +QString KBalooRolesProvider::orientationFromValue(int value) const +{ + QString string; + switch (value) { + case 1: string = i18nc("@item:intable Image orientation", "Unchanged"); break; + case 2: string = i18nc("@item:intable Image orientation", "Horizontally flipped"); break; + case 3: string = i18nc("@item:intable image orientation", "180° rotated"); break; + case 4: string = i18nc("@item:intable image orientation", "Vertically flipped"); break; + case 5: string = i18nc("@item:intable image orientation", "Transposed"); break; + case 6: string = i18nc("@item:intable image orientation", "90° rotated"); break; + case 7: string = i18nc("@item:intable image orientation", "Transversed"); break; + case 8: string = i18nc("@item:intable image orientation", "270° rotated"); break; + default: + break; + } + return string; +} + +QString KBalooRolesProvider::durationFromValue(int value) const +{ + QTime duration; + duration = duration.addSecs(value); + return duration.toString("hh:mm:ss"); +} + diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kbaloorolesprovider.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kbaloorolesprovider.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kbaloorolesprovider.h 1970-01-01 00:00:00.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kbaloorolesprovider.h 2014-05-26 15:31:22.000000000 +0000 @@ -0,0 +1,90 @@ +/*************************************************************************** + * Copyright (C) 2012 by Peter Penz * + * Copyright (C) 2013 by Vishesh Handa * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#ifndef KBALOO_ROLESPROVIDER_H +#define KBALOO_ROLESPROVIDER_H + +#include + +#include +#include +#include + +namespace Baloo { + class File; +} + +/** + * @brief Allows accessing metadata of a file by providing KFileItemModel roles. + * + * Is a helper class for KFileItemModelRolesUpdater to retrieve roles that + * are only accessible with Baloo. + */ +class LIBDOLPHINPRIVATE_EXPORT KBalooRolesProvider +{ +public: + static KBalooRolesProvider& instance(); + virtual ~KBalooRolesProvider(); + + /** + * @return Roles that can be provided by KBalooRolesProvider. + */ + QSet roles() const; + + /** + * @return Values for the roles \a roles that can be determined from the file + * with the URL \a url. + */ + QHash roleValues(const Baloo::File& file, + const QSet& roles) const; + + QByteArray roleForProperty(const QString& property) const; + +protected: + KBalooRolesProvider(); + +private: + /** + * @return User visible string for the given tag-values. + */ + QString tagsFromValues(const QStringList& values) const; + + /** + * @return User visible string for the EXIF-orientation property + * which can have the values 0 to 8. + * (see http://sylvana.net/jpegcrop/exif_orientation.html) + */ + QString orientationFromValue(int value) const; + + /** + * @return Duration in the format HH::MM::SS for the value given + * in seconds. + */ + QString durationFromValue(int value) const; + +private: + QSet m_roles; + QHash m_roleForProperty; + + friend class KBalooRolesProviderSingleton; +}; + +#endif + diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kdirectorycontentscounter.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kdirectorycontentscounter.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kdirectorycontentscounter.cpp 1970-01-01 00:00:00.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kdirectorycontentscounter.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -0,0 +1,184 @@ +/*************************************************************************** + * Copyright (C) 2011 by Peter Penz * + * Copyright (C) 2013 by Frank Reininghaus * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#include "kdirectorycontentscounter.h" + +#include "kdirectorycontentscounterworker.h" +#include + +#include +#include + +KDirectoryContentsCounter::KDirectoryContentsCounter(KFileItemModel* model, QObject* parent) : + QObject(parent), + m_model(model), + m_queue(), + m_worker(0), + m_workerIsBusy(false), + m_dirWatcher(0), + m_watchedDirs() +{ + connect(m_model, SIGNAL(itemsRemoved(KItemRangeList)), + this, SLOT(slotItemsRemoved())); + + if (!m_workerThread) { + m_workerThread = new QThread(); + m_workerThread->start(); + } + + m_worker = new KDirectoryContentsCounterWorker(); + m_worker->moveToThread(m_workerThread); + ++m_workersCount; + + connect(this, SIGNAL(requestDirectoryContentsCount(QString,KDirectoryContentsCounterWorker::Options)), + m_worker, SLOT(countDirectoryContents(QString,KDirectoryContentsCounterWorker::Options))); + connect(m_worker, SIGNAL(result(QString,int)), + this, SLOT(slotResult(QString,int))); + + m_dirWatcher = new KDirWatch(this); + connect(m_dirWatcher, SIGNAL(dirty(QString)), this, SLOT(slotDirWatchDirty(QString))); +} + +KDirectoryContentsCounter::~KDirectoryContentsCounter() +{ + --m_workersCount; + + if (m_workersCount > 0) { + // The worker thread will continue running. It could even be running + // a method of m_worker at the moment, so we delete it using + // deleteLater() to prevent a crash. + m_worker->deleteLater(); + } else { + // There are no remaining workers -> stop the worker thread. + m_workerThread->quit(); + m_workerThread->wait(); + delete m_workerThread; + m_workerThread = 0; + + // The worker thread has finished running now, so it's safe to delete + // m_worker. deleteLater() would not work at all because the event loop + // which would deliver the event to m_worker is not running any more. + delete m_worker; + } +} + +void KDirectoryContentsCounter::addDirectory(const QString& path) +{ + startWorker(path); +} + +int KDirectoryContentsCounter::countDirectoryContentsSynchronously(const QString& path) +{ + if (!m_dirWatcher->contains(path)) { + m_dirWatcher->addDir(path); + m_watchedDirs.insert(path); + } + + KDirectoryContentsCounterWorker::Options options; + + if (m_model->showHiddenFiles()) { + options |= KDirectoryContentsCounterWorker::CountHiddenFiles; + } + + if (m_model->showDirectoriesOnly()) { + options |= KDirectoryContentsCounterWorker::CountDirectoriesOnly; + } + + return KDirectoryContentsCounterWorker::subItemsCount(path, options); +} + +void KDirectoryContentsCounter::slotResult(const QString& path, int count) +{ + m_workerIsBusy = false; + + if (!m_dirWatcher->contains(path)) { + m_dirWatcher->addDir(path); + m_watchedDirs.insert(path); + } + + if (!m_queue.isEmpty()) { + startWorker(m_queue.dequeue()); + } + + emit result(path, count); +} + +void KDirectoryContentsCounter::slotDirWatchDirty(const QString& path) +{ + const int index = m_model->index(KUrl(path)); + if (index >= 0) { + if (!m_model->fileItem(index).isDir()) { + // If INotify is used, KDirWatch issues the dirty() signal + // also for changed files inside the directory, even if we + // don't enable this behavior explicitly (see bug 309740). + return; + } + + startWorker(path); + } +} + +void KDirectoryContentsCounter::slotItemsRemoved() +{ + const bool allItemsRemoved = (m_model->count() == 0); + + if (!m_watchedDirs.isEmpty()) { + // Don't let KDirWatch watch for removed items + if (allItemsRemoved) { + foreach (const QString& path, m_watchedDirs) { + m_dirWatcher->removeDir(path); + } + m_watchedDirs.clear(); + m_queue.clear(); + } else { + QMutableSetIterator it(m_watchedDirs); + while (it.hasNext()) { + const QString& path = it.next(); + if (m_model->index(KUrl(path)) < 0) { + m_dirWatcher->removeDir(path); + it.remove(); + } + } + } + } +} + +void KDirectoryContentsCounter::startWorker(const QString& path) +{ + if (m_workerIsBusy) { + m_queue.enqueue(path); + } else { + KDirectoryContentsCounterWorker::Options options; + + if (m_model->showHiddenFiles()) { + options |= KDirectoryContentsCounterWorker::CountHiddenFiles; + } + + if (m_model->showDirectoriesOnly()) { + options |= KDirectoryContentsCounterWorker::CountDirectoriesOnly; + } + + emit requestDirectoryContentsCount(path, options); + m_workerIsBusy = true; + } +} + +QThread* KDirectoryContentsCounter::m_workerThread = 0; +int KDirectoryContentsCounter::m_workersCount = 0; \ No newline at end of file diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kdirectorycontentscounter.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kdirectorycontentscounter.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kdirectorycontentscounter.h 1970-01-01 00:00:00.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kdirectorycontentscounter.h 2014-05-26 15:31:22.000000000 +0000 @@ -0,0 +1,92 @@ +/*************************************************************************** + * Copyright (C) 2011 by Peter Penz * + * Copyright (C) 2013 by Frank Reininghaus * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#ifndef KDIRECTORYCONTENTSCOUNTER_H +#define KDIRECTORYCONTENTSCOUNTER_H + +#include "kdirectorycontentscounterworker.h" + +#include +#include + +class KDirWatch; +class KFileItemModel; +class QString; + +class KDirectoryContentsCounter : public QObject +{ + Q_OBJECT + +public: + explicit KDirectoryContentsCounter(KFileItemModel* model, QObject* parent = 0); + ~KDirectoryContentsCounter(); + + /** + * Requests the number of items inside the directory \a path. The actual + * counting is done asynchronously, and the result is announced via the + * signal \a result. + * + * The directory \a path is watched for changes, and the signal is emitted + * again if a change occurs. + */ + void addDirectory(const QString& path); + + /** + * In contrast to \a addDirectory, this function counts the items inside + * the directory \a path synchronously and returns the result. + * + * The directory is watched for changes, and the signal \a result is + * emitted if a change occurs. + */ + int countDirectoryContentsSynchronously(const QString& path); + +signals: + /** + * Signals that the directory \a path contains \a count items. + */ + void result(const QString& path, int count); + + void requestDirectoryContentsCount(const QString& path, KDirectoryContentsCounterWorker::Options options); + +private slots: + void slotResult(const QString& path, int count); + void slotDirWatchDirty(const QString& path); + void slotItemsRemoved(); + +private: + void startWorker(const QString& path); + +private: + KFileItemModel* m_model; + + QQueue m_queue; + + static QThread* m_workerThread; + static int m_workersCount; + + KDirectoryContentsCounterWorker* m_worker; + bool m_workerIsBusy; + + KDirWatch* m_dirWatcher; + QSet m_watchedDirs; // Required as sadly KDirWatch does not offer a getter method + // to get all watched directories. +}; + +#endif \ No newline at end of file diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kdirectorycontentscounterworker.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kdirectorycontentscounterworker.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kdirectorycontentscounterworker.cpp 1970-01-01 00:00:00.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kdirectorycontentscounterworker.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -0,0 +1,95 @@ +/*************************************************************************** + * Copyright (C) 2011 by Peter Penz * + * Copyright (C) 2013 by Frank Reininghaus * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#include "kdirectorycontentscounterworker.h" + +// Required includes for subItemsCount(): +#ifdef Q_WS_WIN + #include +#else + #include + #include +#endif + +KDirectoryContentsCounterWorker::KDirectoryContentsCounterWorker(QObject* parent) : + QObject(parent) +{ + qRegisterMetaType(); +} + +int KDirectoryContentsCounterWorker::subItemsCount(const QString& path, Options options) +{ + const bool countHiddenFiles = options & CountHiddenFiles; + const bool countDirectoriesOnly = options & CountDirectoriesOnly; + +#ifdef Q_WS_WIN + QDir dir(path); + QDir::Filters filters = QDir::NoDotAndDotDot | QDir::System; + if (countHiddenFiles) { + filters |= QDir::Hidden; + } + if (countDirectoriesOnly) { + filters |= QDir::Dirs; + } else { + filters |= QDir::AllEntries; + } + return dir.entryList(filters).count(); +#else + // Taken from kdelibs/kio/kio/kdirmodel.cpp + // Copyright (C) 2006 David Faure + + int count = -1; + DIR* dir = ::opendir(QFile::encodeName(path)); + if (dir) { // krazy:exclude=syscalls + count = 0; + struct dirent *dirEntry = 0; + while ((dirEntry = ::readdir(dir))) { + if (dirEntry->d_name[0] == '.') { + if (dirEntry->d_name[1] == '\0' || !countHiddenFiles) { + // Skip "." or hidden files + continue; + } + if (dirEntry->d_name[1] == '.' && dirEntry->d_name[2] == '\0') { + // Skip ".." + continue; + } + } + + // If only directories are counted, consider an unknown file type and links also + // as directory instead of trying to do an expensive stat() + // (see bugs 292642 and 299997). + const bool countEntry = !countDirectoriesOnly || + dirEntry->d_type == DT_DIR || + dirEntry->d_type == DT_LNK || + dirEntry->d_type == DT_UNKNOWN; + if (countEntry) { + ++count; + } + } + ::closedir(dir); + } + return count; +#endif +} + +void KDirectoryContentsCounterWorker::countDirectoryContents(const QString& path, Options options) +{ + emit result(path, subItemsCount(path, options)); +} diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kdirectorycontentscounterworker.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kdirectorycontentscounterworker.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kdirectorycontentscounterworker.h 1970-01-01 00:00:00.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kdirectorycontentscounterworker.h 2014-05-26 15:31:22.000000000 +0000 @@ -0,0 +1,71 @@ +/*************************************************************************** + * Copyright (C) 2013 by Frank Reininghaus * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#ifndef KDIRECTORYCONTENTENTSCOUNTERWORKER_H +#define KDIRECTORYCONTENTENTSCOUNTERWORKER_H + +#include +#include +#include + +class QString; + +class KDirectoryContentsCounterWorker : public QObject +{ + Q_OBJECT + +public: + enum Option { + NoOptions = 0x0, + CountHiddenFiles = 0x1, + CountDirectoriesOnly = 0x2 + }; + Q_DECLARE_FLAGS(Options, Option) + + explicit KDirectoryContentsCounterWorker(QObject* parent = 0); + + /** + * Counts the items inside the directory \a path using the options + * \a options. + * + * @return The number of items. + */ + static int subItemsCount(const QString& path, Options options); + +signals: + /** + * Signals that the directory \a path contains \a count items. + */ + void result(const QString& path, int count); + +public slots: + /** + * Requests the number of items inside the directory \a path using the + * options \a options. The result is announced via the signal \a result. + */ + // Note that the full type name KDirectoryContentsCounterWorker::Options + // is needed here. Just using 'Options' is OK for the compiler, but + // confuses moc. + void countDirectoryContents(const QString& path, KDirectoryContentsCounterWorker::Options options); +}; + +Q_DECLARE_METATYPE(KDirectoryContentsCounterWorker::Options) +Q_DECLARE_OPERATORS_FOR_FLAGS(KDirectoryContentsCounterWorker::Options) + +#endif diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistheaderwidget.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistheaderwidget.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistheaderwidget.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistheaderwidget.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -327,6 +327,22 @@ } } +void KItemListHeaderWidget::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + QGraphicsItem::mouseDoubleClickEvent(event); + + const int roleIndex = roleIndexAt(event->pos()); + if (roleIndex >= 0 && isAboveRoleGrip(event->pos(), roleIndex)) { + const QByteArray role = m_columns.at(roleIndex); + + qreal previousWidth = columnWidth(role); + setColumnWidth(role, preferredColumnWidth(role)); + qreal currentWidth = columnWidth(role); + + emit columnWidthChanged(role, currentWidth, previousWidth); + } +} + void KItemListHeaderWidget::hoverEnterEvent(QGraphicsSceneHoverEvent* event) { QGraphicsWidget::hoverEnterEvent(event); diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistheaderwidget.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistheaderwidget.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistheaderwidget.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistheaderwidget.h 2014-05-26 15:31:22.000000000 +0000 @@ -100,6 +100,7 @@ virtual void mousePressEvent(QGraphicsSceneMouseEvent* event); virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event); virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event); virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* event); diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -46,6 +46,12 @@ const bool newSearch = m_searchedString.isEmpty(); + // Do not start a new search if the user pressed Space. Only add + // it to the search string if a search is in progress already. + if (newSearch && keys == QLatin1String(" ")) { + return; + } + if (!keys.isEmpty()) { m_searchedString.append(keys); diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistselectiontoggle.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistselectiontoggle.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistselectiontoggle.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistselectiontoggle.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,6 @@ m_checked(false), m_hovered(false) { - setAcceptHoverEvents(true); } KItemListSelectionToggle::~KItemListSelectionToggle() @@ -51,6 +50,15 @@ return m_checked; } +void KItemListSelectionToggle::setHovered(bool hovered) +{ + if (m_hovered != hovered) { + m_hovered = hovered; + m_pixmap = QPixmap(); + update(); + } +} + void KItemListSelectionToggle::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) { Q_UNUSED(option); @@ -65,20 +73,6 @@ painter->drawPixmap(x, y, m_pixmap); } -void KItemListSelectionToggle::hoverEnterEvent(QGraphicsSceneHoverEvent* event) -{ - QGraphicsWidget::hoverEnterEvent(event); - m_hovered = true; - m_pixmap = QPixmap(); -} - -void KItemListSelectionToggle::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) -{ - QGraphicsWidget::hoverLeaveEvent(event); - m_hovered = false; - m_pixmap = QPixmap(); -} - void KItemListSelectionToggle::resizeEvent(QGraphicsSceneResizeEvent* event) { QGraphicsWidget::resizeEvent(event); @@ -97,12 +91,9 @@ void KItemListSelectionToggle::updatePixmap() { - const char* icon = m_checked ? "list-remove" : "list-add"; - m_pixmap = KIconLoader::global()->loadIcon(QLatin1String(icon), KIconLoader::NoGroup, iconSize()); - - if (m_hovered) { - KIconLoader::global()->iconEffect()->apply(m_pixmap, KIconLoader::Desktop, KIconLoader::ActiveState); - } + const QString icon = m_checked ? "list-remove" : "list-add"; + const KIconLoader::States state = m_hovered ? KIconLoader::ActiveState : KIconLoader::DisabledState; + m_pixmap = KIconLoader::global()->loadIcon(icon, KIconLoader::Desktop, iconSize(), state); } int KItemListSelectionToggle::iconSize() const diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistselectiontoggle.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistselectiontoggle.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistselectiontoggle.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistselectiontoggle.h 2014-05-26 15:31:22.000000000 +0000 @@ -41,11 +41,11 @@ void setChecked(bool checked); bool isChecked() const; + void setHovered(bool hovered); + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); protected: - virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event); - virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event); virtual void resizeEvent(QGraphicsSceneResizeEvent* event); private: diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistsizehintresolver.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistsizehintresolver.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistsizehintresolver.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistsizehintresolver.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -23,7 +23,8 @@ KItemListSizeHintResolver::KItemListSizeHintResolver(const KItemListView* itemListView) : m_itemListView(itemListView), - m_sizeHintCache() + m_sizeHintCache(), + m_needsResolving(false) { } @@ -31,14 +32,10 @@ { } -QSizeF KItemListSizeHintResolver::sizeHint(int index) const +QSizeF KItemListSizeHintResolver::sizeHint(int index) { - QSizeF size = m_sizeHintCache.at(index); - if (size.isEmpty()) { - size = m_itemListView->itemSizeHint(index); - m_sizeHintCache[index] = size; - } - return size; + updateCache(); + return m_sizeHintCache.at(index); } void KItemListSizeHintResolver::itemsInserted(const KItemRangeList& itemRanges) @@ -77,6 +74,8 @@ } } + m_needsResolving = true; + Q_ASSERT(m_sizeHintCache.count() == m_itemListView->model()->count()); } @@ -120,7 +119,7 @@ const int movedRangeEnd = range.index + range.count; for (int i = range.index; i < movedRangeEnd; ++i) { - const int newIndex = movedToIndexes.at(i); + const int newIndex = movedToIndexes.at(i - range.index); newSizeHintCache[newIndex] = m_sizeHintCache.at(i); } @@ -135,12 +134,20 @@ ++index; --count; } + + m_needsResolving = true; } void KItemListSizeHintResolver::clearCache() { - const int count = m_sizeHintCache.count(); - for (int i = 0; i < count; ++i) { - m_sizeHintCache[i] = QSizeF(); + m_sizeHintCache.fill(QSizeF()); + m_needsResolving = true; +} + +void KItemListSizeHintResolver::updateCache() +{ + if (m_needsResolving) { + m_itemListView->calculateItemSizeHints(m_sizeHintCache); + m_needsResolving = false; } } diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistsizehintresolver.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistsizehintresolver.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistsizehintresolver.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistsizehintresolver.h 2014-05-26 15:31:22.000000000 +0000 @@ -36,7 +36,7 @@ public: KItemListSizeHintResolver(const KItemListView* itemListView); virtual ~KItemListSizeHintResolver(); - QSizeF sizeHint(int index) const; + QSizeF sizeHint(int index); void itemsInserted(const KItemRangeList& itemRanges); void itemsRemoved(const KItemRangeList& itemRanges); @@ -44,10 +44,12 @@ void itemsChanged(int index, int count, const QSet& roles); void clearCache(); + void updateCache(); private: const KItemListView* m_itemListView; mutable QVector m_sizeHintCache; + bool m_needsResolving; }; #endif diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistviewanimation.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistviewanimation.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistviewanimation.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistviewanimation.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -225,13 +225,13 @@ { QPropertyAnimation* finishedAnim = qobject_cast(sender()); for (int type = 0; type < AnimationTypeCount; ++type) { - QHashIterator it(m_animation[type]); + QMutableHashIterator it(m_animation[type]); while (it.hasNext()) { it.next(); QPropertyAnimation* propertyAnim = it.value(); if (propertyAnim == finishedAnim) { QGraphicsWidget* widget = it.key(); - m_animation[type].remove(widget); + it.remove(); finishedAnim->deleteLater(); emit finished(widget, static_cast(type)); diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistviewlayouter.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistviewlayouter.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistviewlayouter.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistviewlayouter.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -26,7 +26,7 @@ // #define KITEMLISTVIEWLAYOUTER_DEBUG -KItemListViewLayouter::KItemListViewLayouter(QObject* parent) : +KItemListViewLayouter::KItemListViewLayouter(KItemListSizeHintResolver* sizeHintResolver, QObject* parent) : QObject(parent), m_dirty(true), m_visibleIndexesDirty(true), @@ -36,7 +36,7 @@ m_itemMargin(), m_headerHeight(0), m_model(0), - m_sizeHintResolver(0), + m_sizeHintResolver(sizeHintResolver), m_scrollOffset(0), m_maximumScrollOffset(0), m_itemOffset(0), @@ -46,11 +46,14 @@ m_columnWidth(0), m_xPosInc(0), m_columnCount(0), + m_rowOffsets(), + m_columnOffsets(), m_groupItemIndexes(), m_groupHeaderHeight(0), m_groupHeaderMargin(0), m_itemInfos() { + Q_ASSERT(m_sizeHintResolver); } KItemListViewLayouter::~KItemListViewLayouter() @@ -207,19 +210,6 @@ return m_model; } -void KItemListViewLayouter::setSizeHintResolver(const KItemListSizeHintResolver* sizeHintResolver) -{ - if (m_sizeHintResolver != sizeHintResolver) { - m_sizeHintResolver = sizeHintResolver; - m_dirty = true; - } -} - -const KItemListSizeHintResolver* KItemListViewLayouter::sizeHintResolver() const -{ - return m_sizeHintResolver; -} - int KItemListViewLayouter::firstVisibleIndex() const { const_cast(this)->doLayout(); @@ -239,20 +229,26 @@ return QRectF(); } + QSizeF sizeHint = m_sizeHintResolver->sizeHint(index); + + const qreal x = m_columnOffsets.at(m_itemInfos.at(index).column); + const qreal y = m_rowOffsets.at(m_itemInfos.at(index).row); + if (m_scrollOrientation == Qt::Horizontal) { // Rotate the logical direction which is always vertical by 90° // to get the physical horizontal direction - const QRectF& b = m_itemInfos[index].rect; - QRectF bounds(b.y(), b.x(), b.height(), b.width()); - QPointF pos = bounds.topLeft(); + QPointF pos(y, x); pos.rx() -= m_scrollOffset; - bounds.moveTo(pos); - return bounds; + return QRectF(pos, sizeHint); } - QRectF bounds = m_itemInfos[index].rect; - bounds.moveTo(bounds.topLeft() - QPointF(m_itemOffset, m_scrollOffset)); - return bounds; + if (sizeHint.width() <= 0) { + // In Details View, a size hint with negative width is used internally. + sizeHint.rwidth() = m_itemSize.width(); + } + + const QPointF pos(x - m_itemOffset, y - m_scrollOffset); + return QRectF(pos, sizeHint); } QRectF KItemListViewLayouter::groupHeaderRect(int index) const @@ -274,27 +270,28 @@ pos.rx() -= m_itemMargin.width(); pos.ry() = 0; - // Determine the maximum width used in the - // current column. As the scroll-direction is - // Qt::Horizontal and m_itemRects is accessed directly, - // the logical height represents the visual width. - qreal width = minimumGroupHeaderWidth(); - const qreal y = m_itemInfos[index].rect.y(); + // Determine the maximum width used in the current column. As the + // scroll-direction is Qt::Horizontal and m_itemRects is accessed + // directly, the logical height represents the visual width, and + // the logical row represents the column. + qreal headerWidth = minimumGroupHeaderWidth(); + const int row = m_itemInfos[index].row; const int maxIndex = m_itemInfos.count() - 1; while (index <= maxIndex) { - QRectF bounds = m_itemInfos[index].rect; - if (bounds.y() != y) { + if (m_itemInfos[index].row != row) { break; } - if (bounds.height() > width) { - width = bounds.height(); + const qreal itemWidth = m_sizeHintResolver->sizeHint(index).width(); + + if (itemWidth > headerWidth) { + headerWidth = itemWidth; } ++index; } - size = QSizeF(width, m_size.height()); + size = QSizeF(headerWidth, m_size.height()); } return QRectF(pos, size); } @@ -375,12 +372,9 @@ if (horizontalScrolling) { // Flip everything so that the layout logically can work like having // a vertical scrolling - itemSize.setWidth(m_itemSize.height()); - itemSize.setHeight(m_itemSize.width()); - itemMargin.setWidth(m_itemMargin.height()); - itemMargin.setHeight(m_itemMargin.width()); - size.setWidth(m_size.height()); - size.setHeight(m_size.width()); + itemSize.transpose(); + itemMargin.transpose(); + size.transpose(); if (grouped) { // In the horizontal scrolling case all groups are aligned @@ -406,28 +400,42 @@ } } - int rowCount = itemCount / m_columnCount; - if (itemCount % m_columnCount != 0) { - ++rowCount; + m_itemInfos.resize(itemCount); + + // Calculate the offset of each column, i.e., the x-coordinate where the column starts. + m_columnOffsets.resize(m_columnCount); + qreal currentOffset = m_xPosInc; + + if (grouped && horizontalScrolling) { + // All group headers will always be aligned on the top and not + // flipped like the other properties. + currentOffset += m_groupHeaderHeight; + } + + for (int column = 0; column < m_columnCount; ++column) { + m_columnOffsets[column] = currentOffset; + currentOffset += m_columnWidth; } - m_itemInfos.reserve(itemCount); + // Prepare the QVector which stores the y-coordinate for each new row. + int numberOfRows = (itemCount + m_columnCount - 1) / m_columnCount; + if (grouped && m_columnCount > 1) { + // In the worst case, a new row will be started for every group. + // We could calculate the exact number of rows now to prevent that we reserve + // too much memory, but the code required to do that might need much more + // memory than it would save in the average case. + numberOfRows += m_groupItemIndexes.count(); + } + m_rowOffsets.resize(numberOfRows); qreal y = m_headerHeight + itemMargin.height(); int row = 0; int index = 0; while (index < itemCount) { - qreal x = m_xPosInc; qreal maxItemHeight = itemSize.height(); if (grouped) { - if (horizontalScrolling) { - // All group headers will always be aligned on the top and not - // flipped like the other properties - x += m_groupHeaderHeight; - } - if (m_groupItemIndexes.contains(index)) { // The item is the first item of a group. // Increase the y-position to provide space @@ -447,29 +455,20 @@ } } + m_rowOffsets[row] = y; + int column = 0; while (index < itemCount && column < m_columnCount) { qreal requiredItemHeight = itemSize.height(); - if (m_sizeHintResolver) { - const QSizeF sizeHint = m_sizeHintResolver->sizeHint(index); - const qreal sizeHintHeight = horizontalScrolling ? sizeHint.width() : sizeHint.height(); - if (sizeHintHeight > requiredItemHeight) { - requiredItemHeight = sizeHintHeight; - } + const QSizeF sizeHint = m_sizeHintResolver->sizeHint(index); + const qreal sizeHintHeight = horizontalScrolling ? sizeHint.width() : sizeHint.height(); + if (sizeHintHeight > requiredItemHeight) { + requiredItemHeight = sizeHintHeight; } - const QRectF bounds(x, y, itemSize.width(), requiredItemHeight); - if (index < m_itemInfos.count()) { - m_itemInfos[index].rect = bounds; - m_itemInfos[index].column = column; - m_itemInfos[index].row = row; - } else { - ItemInfo itemInfo; - itemInfo.rect = bounds; - itemInfo.column = column; - itemInfo.row = row; - m_itemInfos.append(itemInfo); - } + ItemInfo& itemInfo = m_itemInfos[index]; + itemInfo.column = column; + itemInfo.row = row; if (grouped && horizontalScrolling) { // When grouping is enabled in the horizontal mode, the header alignment @@ -491,7 +490,6 @@ } maxItemHeight = qMax(maxItemHeight, requiredItemHeight); - x += m_columnWidth; ++index; ++column; @@ -505,24 +503,9 @@ y += maxItemHeight + itemMargin.height(); ++row; } - if (m_itemInfos.count() > itemCount) { - m_itemInfos.erase(m_itemInfos.begin() + itemCount, - m_itemInfos.end()); - } if (itemCount > 0) { - // Calculate the maximum y-range of the last row for m_maximumScrollOffset - m_maximumScrollOffset = m_itemInfos.last().rect.bottom(); - const qreal rowY = m_itemInfos.last().rect.y(); - - int index = m_itemInfos.count() - 2; - while (index >= 0 && m_itemInfos[index].rect.bottom() >= rowY) { - m_maximumScrollOffset = qMax(m_maximumScrollOffset, m_itemInfos[index].rect.bottom()); - --index; - } - - m_maximumScrollOffset += itemMargin.height(); - + m_maximumScrollOffset = y; m_maximumItemOffset = m_columnCount * m_columnWidth; } else { m_maximumScrollOffset = 0; @@ -561,7 +544,7 @@ int mid = 0; do { mid = (min + max) / 2; - if (m_itemInfos[mid].rect.top() < m_scrollOffset) { + if (m_rowOffsets.at(m_itemInfos[mid].row) < m_scrollOffset) { min = mid + 1; } else { max = mid - 1; @@ -571,13 +554,13 @@ if (mid > 0) { // Include the row before the first fully visible index, as it might // be partly visible - if (m_itemInfos[mid].rect.top() >= m_scrollOffset) { + if (m_rowOffsets.at(m_itemInfos[mid].row) >= m_scrollOffset) { --mid; - Q_ASSERT(m_itemInfos[mid].rect.top() < m_scrollOffset); + Q_ASSERT(m_rowOffsets.at(m_itemInfos[mid].row) < m_scrollOffset); } - const qreal rowTop = m_itemInfos[mid].rect.top(); - while (mid > 0 && m_itemInfos[mid - 1].rect.top() == rowTop) { + const int firstVisibleRow = m_itemInfos[mid].row; + while (mid > 0 && m_itemInfos[mid - 1].row == firstVisibleRow) { --mid; } } @@ -594,14 +577,14 @@ max = maxIndex; do { mid = (min + max) / 2; - if (m_itemInfos[mid].rect.y() <= bottom) { + if (m_rowOffsets.at(m_itemInfos[mid].row) <= bottom) { min = mid + 1; } else { max = mid - 1; } } while (min <= max); - while (mid > 0 && m_itemInfos[mid].rect.y() > bottom) { + while (mid > 0 && m_rowOffsets.at(m_itemInfos[mid].row) > bottom) { --mid; } m_lastVisibleIndex = mid; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistviewlayouter.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistviewlayouter.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/kitemlistviewlayouter.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/kitemlistviewlayouter.h 2014-05-26 15:31:22.000000000 +0000 @@ -50,7 +50,7 @@ Q_OBJECT public: - KItemListViewLayouter(QObject* parent = 0); + KItemListViewLayouter(KItemListSizeHintResolver* sizeHintResolver, QObject* parent = 0); virtual ~KItemListViewLayouter(); void setScrollOrientation(Qt::Orientation orientation); @@ -103,9 +103,6 @@ void setModel(const KItemModelBase* model); const KItemModelBase* model() const; - void setSizeHintResolver(const KItemListSizeHintResolver* sizeHintResolver); - const KItemListSizeHintResolver* sizeHintResolver() const; - /** * @return The first (at least partly) visible index. -1 is returned * if the item count is 0. @@ -205,7 +202,7 @@ QSizeF m_itemMargin; qreal m_headerHeight; const KItemModelBase* m_model; - const KItemListSizeHintResolver* m_sizeHintResolver; + KItemListSizeHintResolver* m_sizeHintResolver; qreal m_scrollOffset; qreal m_maximumScrollOffset; @@ -220,6 +217,9 @@ qreal m_xPosInc; int m_columnCount; + QVector m_rowOffsets; + QVector m_columnOffsets; + // Stores all item indexes that are the first item of a group. // Assures fast access for KItemListViewLayouter::isFirstGroupItem(). QSet m_groupItemIndexes; @@ -227,7 +227,6 @@ qreal m_groupHeaderMargin; struct ItemInfo { - QRectF rect; int column; int row; }; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/knepomukrolesprovider.cpp netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/knepomukrolesprovider.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/knepomukrolesprovider.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/knepomukrolesprovider.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,201 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ - -#include "knepomukrolesprovider.h" - -#include -#include -#include - -#include -#include -#include -#include - -#include - -struct KNepomukRolesProviderSingleton -{ - KNepomukRolesProvider instance; -}; -K_GLOBAL_STATIC(KNepomukRolesProviderSingleton, s_nepomukRolesProvider) - - -KNepomukRolesProvider& KNepomukRolesProvider::instance() -{ - return s_nepomukRolesProvider->instance; -} - -KNepomukRolesProvider::~KNepomukRolesProvider() -{ -} - -QSet KNepomukRolesProvider::roles() const -{ - return m_roles; -} - -QHash KNepomukRolesProvider::roleValues(const Nepomuk2::Resource& resource, - const QSet& roles) const -{ - if (!resource.isValid()) { - return QHash(); - } - - QHash values; - - int width = -1; - int height = -1; - - QHashIterator it(resource.properties()); - while (it.hasNext()) { - it.next(); - - const Nepomuk2::Types::Property property = it.key(); - const QByteArray role = roleForPropertyUri(property.uri()); - if (role.isEmpty() || !roles.contains(role)) { - continue; - } - - const Nepomuk2::Variant value = it.value(); - - if (role == "imageSize") { - // Merge the two Nepomuk properties for width and height - // as one string into the "imageSize" role - const QString uri = property.uri().toString(); - if (uri.endsWith(QLatin1String("#width"))) { - width = value.toInt(); - } else if (uri.endsWith(QLatin1String("#height"))) { - height = value.toInt(); - } - - if (width >= 0 && height >= 0) { - const QString widthAndHeight = QString::number(width) + - QLatin1String(" x ") + - QString::number(height); - values.insert(role, widthAndHeight); - } - } else if (role == "tags") { - const QString tags = tagsFromValues(value.toStringList()); - values.insert(role, tags); - } else if (role == "orientation") { - const QString orientation = orientationFromValue(value.toInt()); - values.insert(role, orientation); - } else if (role == "duration") { - const QString duration = durationFromValue(value.toInt()); - values.insert(role, duration); - } else if (value.isResource()) { - const Nepomuk2::Resource resource = value.toResource(); - values.insert(role, resource.genericLabel()); - } else if (value.isResourceList()) { - const QList resList = value.toResourceList(); - QStringList strList; - foreach (const Nepomuk2::Resource& res, resList) { - strList << res.genericLabel(); - } - values.insert(role, strList.join(QLatin1String(", "))); - } else { - values.insert(role, value.toString()); - } - } - - return values; -} - -QByteArray KNepomukRolesProvider::roleForPropertyUri(const QUrl& uri) const -{ - return m_roleForUri.value(uri); -} - -KNepomukRolesProvider::KNepomukRolesProvider() : - m_roles(), - m_roleForUri() -{ - struct UriInfo - { - const char* const uri; - const char* const role; - }; - - // Mapping from the URIs to the KFileItemModel roles. Note that this must not be - // a 1:1 mapping: One role may contain several URI-values (e.g. the URIs for height and - // width of an image are mapped to the role "imageSize") - static const UriInfo uriInfoList[] = { - { "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#numericRating", "rating" }, - { "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag", "tags" }, - { "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#description", "comment" }, - { "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#wordCount", "wordCount" }, - { "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#lineCount", "lineCount" }, - { "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#width", "imageSize" }, - { "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#height", "imageSize" }, - { "http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#orientation", "orientation", }, - { "http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#performer", "artist" }, - { "http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#musicAlbum", "album" }, - { "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#duration", "duration" }, - { "http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#trackNumber", "track" }, - { "http://www.semanticdesktop.org/ontologies/2010/04/30/ndo#copiedFrom", "copiedFrom" } - }; - - for (unsigned int i = 0; i < sizeof(uriInfoList) / sizeof(UriInfo); ++i) { - m_roleForUri.insert(QUrl(uriInfoList[i].uri), uriInfoList[i].role); - m_roles.insert(uriInfoList[i].role); - } -} - -QString KNepomukRolesProvider::tagsFromValues(const QStringList& values) const -{ - QString tags; - - for (int i = 0; i < values.count(); ++i) { - if (i > 0) { - tags.append(QLatin1String(", ")); - } - - const Nepomuk2::Tag tag(values[i]); - tags += tag.genericLabel(); - } - - return tags; -} - -QString KNepomukRolesProvider::orientationFromValue(int value) const -{ - QString string; - switch (value) { - case 1: string = i18nc("@item:intable Image orientation", "Unchanged"); break; - case 2: string = i18nc("@item:intable Image orientation", "Horizontally flipped"); break; - case 3: string = i18nc("@item:intable image orientation", "180° rotated"); break; - case 4: string = i18nc("@item:intable image orientation", "Vertically flipped"); break; - case 5: string = i18nc("@item:intable image orientation", "Transposed"); break; - case 6: string = i18nc("@item:intable image orientation", "90° rotated"); break; - case 7: string = i18nc("@item:intable image orientation", "Transversed"); break; - case 8: string = i18nc("@item:intable image orientation", "270° rotated"); break; - default: - break; - } - return string; -} - -QString KNepomukRolesProvider::durationFromValue(int value) const -{ - QTime duration; - duration = duration.addSecs(value); - return duration.toString("hh:mm:ss"); -} - diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/knepomukrolesprovider.h netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/knepomukrolesprovider.h --- netrunner-desktop-containment-4.11.1/dolphin/src/kitemviews/private/knepomukrolesprovider.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/kitemviews/private/knepomukrolesprovider.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ - -#ifndef KNEPOMUKROLESPROVIDER_H -#define KNEPOMUKROLESPROVIDER_H - -#include - -#include -#include -#include - -namespace Nepomuk2 -{ - class Resource; -} - -/** - * @brief Allows accessing metadata of a file by providing KFileItemModel roles. - * - * Is a helper class for KFileItemModelRolesUpdater to retrieve roles that - * are only accessible with Nepomuk. - */ -class LIBDOLPHINPRIVATE_EXPORT KNepomukRolesProvider -{ -public: - static KNepomukRolesProvider& instance(); - virtual ~KNepomukRolesProvider(); - - /** - * @return Roles that can be provided by KNepomukRolesProvider. - */ - QSet roles() const; - - /** - * @return Values for the roles \a roles that can be determined from the file - * with the URL \a url. - */ - QHash roleValues(const Nepomuk2::Resource& resource, - const QSet& roles) const; - - QByteArray roleForPropertyUri(const QUrl& uri) const; - -protected: - KNepomukRolesProvider(); - -private: - /** - * @return User visible string for the given tag-values. - */ - QString tagsFromValues(const QStringList& values) const; - - /** - * @return User visible string for the EXIF-orientation property - * which can have the values 0 to 8. - * (see http://sylvana.net/jpegcrop/exif_orientation.html) - */ - QString orientationFromValue(int value) const; - - /** - * @return Duration in the format HH::MM::SS for the value given - * in seconds. - */ - QString durationFromValue(int value) const; - -private: - QSet m_roles; - QHash m_roleForUri; - - friend class KNepomukRolesProviderSingleton; -}; - -#endif - diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/main.cpp netrunner-desktop-containment-4.13.0/dolphin/src/main.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/main.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/main.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -36,7 +36,7 @@ KDE_VERSION_STRING, ki18nc("@title", "File Manager"), KAboutData::License_GPL, - ki18nc("@info:credit", "(C) 2006-2013 Peter Penz and Frank Reininghaus")); + ki18nc("@info:credit", "(C) 2006-2014 Peter Penz and Frank Reininghaus")); about.setHomepage("http://dolphin.kde.org"); about.addAuthor(ki18nc("@info:credit", "Frank Reininghaus"), ki18nc("@info:credit", "Maintainer (since 2012) and developer"), diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/panels/information/filemetadataconfigurationdialog.cpp netrunner-desktop-containment-4.13.0/dolphin/src/panels/information/filemetadataconfigurationdialog.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/panels/information/filemetadataconfigurationdialog.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/panels/information/filemetadataconfigurationdialog.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -19,10 +19,10 @@ #include "filemetadataconfigurationdialog.h" -#ifndef HAVE_NEPOMUK +#ifndef HAVE_BALOO #include #else -#include +#include #endif #include @@ -44,10 +44,10 @@ "be shown:"), this); m_descriptionLabel->setWordWrap(true); -#ifndef HAVE_NEPOMUK +#ifndef HAVE_BALOO m_configWidget = new KFileMetaDataConfigurationWidget(this); #else - m_configWidget = new Nepomuk2::FileMetaDataConfigWidget(this); + m_configWidget = new Baloo::FileMetaDataConfigWidget(this); #endif diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/panels/information/filemetadataconfigurationdialog.h netrunner-desktop-containment-4.13.0/dolphin/src/panels/information/filemetadataconfigurationdialog.h --- netrunner-desktop-containment-4.11.1/dolphin/src/panels/information/filemetadataconfigurationdialog.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/panels/information/filemetadataconfigurationdialog.h 2014-05-26 15:31:22.000000000 +0000 @@ -22,12 +22,12 @@ #include #include -#include "config-nepomuk.h" +#include "config-baloo.h" -#ifndef HAVE_NEPOMUK +#ifndef HAVE_BALOO class KFileMetaDataConfigurationWidget; #else -namespace Nepomuk2 { +namespace Baloo { class FileMetaDataConfigWidget; } #endif @@ -71,10 +71,10 @@ private: QLabel* m_descriptionLabel; -#ifndef HAVE_NEPOMUK +#ifndef HAVE_BALOO KFileMetaDataConfigurationWidget* m_configWidget; #else - Nepomuk2::FileMetaDataConfigWidget* m_configWidget; + Baloo::FileMetaDataConfigWidget* m_configWidget; #endif }; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/panels/information/informationpanelcontent.cpp netrunner-desktop-containment-4.13.0/dolphin/src/panels/information/informationpanelcontent.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/panels/information/informationpanelcontent.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/panels/information/informationpanelcontent.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -31,10 +31,10 @@ #include #include -#ifndef HAVE_NEPOMUK +#ifndef HAVE_BALOO #include #else -#include +#include #endif #include @@ -64,7 +64,7 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) : QWidget(parent), m_item(), - m_pendingPreview(false), + m_previewJob(0), m_outdatedPreviewTimer(0), m_preview(0), m_phononWidget(0), @@ -112,10 +112,10 @@ const bool previewsShown = InformationPanelSettings::previewsShown(); m_preview->setVisible(previewsShown); -#ifndef HAVE_NEPOMUK +#ifndef HAVE_BALOO m_metaDataWidget = new KFileMetaDataWidget(parent); #else - m_metaDataWidget = new Nepomuk2::FileMetaDataWidget(parent); + m_metaDataWidget = new Baloo::FileMetaDataWidget(parent); #endif m_metaDataWidget->setFont(KGlobalSettings::smallestReadableFont()); m_metaDataWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum); @@ -159,10 +159,14 @@ void InformationPanelContent::showItem(const KFileItem& item) { - m_pendingPreview = false; + // If there is a preview job, kill it to prevent that we have jobs for + // multiple items running, and thus a race condition (bug 250787). + if (m_previewJob) { + m_previewJob->kill(); + } const KUrl itemUrl = item.url(); - const bool isSearchUrl = itemUrl.protocol().contains("search") && item.nepomukUri().isEmpty(); + const bool isSearchUrl = itemUrl.protocol().contains("search") && item.localPath().isEmpty(); if (!applyPlace(itemUrl)) { setNameLabelText(item.text()); if (isSearchUrl) { @@ -175,7 +179,6 @@ m_preview->setPixmap(icon); } else { // try to get a preview pixmap from the item... - m_pendingPreview = true; // Mark the currently shown preview as outdated. This is done // with a small delay to prevent a flickering when the next preview @@ -186,16 +189,16 @@ m_outdatedPreviewTimer->start(); } - KIO::PreviewJob* job = new KIO::PreviewJob(KFileItemList() << item, QSize(m_preview->width(), m_preview->height())); - job->setScaleType(KIO::PreviewJob::Unscaled); - job->setIgnoreMaximumSize(item.isLocalFile()); - if (job->ui()) { - job->ui()->setWindow(this); + m_previewJob = new KIO::PreviewJob(KFileItemList() << item, QSize(m_preview->width(), m_preview->height())); + m_previewJob->setScaleType(KIO::PreviewJob::Unscaled); + m_previewJob->setIgnoreMaximumSize(item.isLocalFile()); + if (m_previewJob->ui()) { + m_previewJob->ui()->setWindow(this); } - connect(job, SIGNAL(gotPreview(KFileItem,QPixmap)), + connect(m_previewJob, SIGNAL(gotPreview(KFileItem,QPixmap)), this, SLOT(showPreview(KFileItem,QPixmap))); - connect(job, SIGNAL(failed(KFileItem)), + connect(m_previewJob, SIGNAL(failed(KFileItem)), this, SLOT(showIcon(KFileItem))); } } @@ -227,7 +230,11 @@ void InformationPanelContent::showItems(const KFileItemList& items) { - m_pendingPreview = false; + // If there is a preview job, kill it to prevent that we have jobs for + // multiple items running, and thus a race condition (bug 250787). + if (m_previewJob) { + m_previewJob->kill(); + } KIconLoader iconLoader; QPixmap icon = iconLoader.loadIcon("dialog-information", @@ -264,6 +271,10 @@ adjustWidgetSizes(parentWidget()->width()); break; + case QEvent::FontChange: + m_metaDataWidget->setFont(KGlobalSettings::smallestReadableFont()); + break; + default: break; } @@ -315,7 +326,6 @@ void InformationPanelContent::showIcon(const KFileItem& item) { m_outdatedPreviewTimer->stop(); - m_pendingPreview = false; if (!applyPlace(item.targetUrl())) { KIcon icon(item.iconName(), KIconLoader::global(), item.overlays()); m_preview->setPixmap(icon.pixmap(KIconLoader::SizeEnormous)); @@ -327,12 +337,10 @@ { m_outdatedPreviewTimer->stop(); Q_UNUSED(item); - if (m_pendingPreview) { - QPixmap p = pixmap; - KIconLoader::global()->drawOverlays(item.overlays(), p, KIconLoader::Desktop); - m_preview->setPixmap(p); - m_pendingPreview = false; - } + + QPixmap p = pixmap; + KIconLoader::global()->drawOverlays(item.overlays(), p, KIconLoader::Desktop); + m_preview->setPixmap(p); } void InformationPanelContent::markOutdatedPreview() @@ -351,7 +359,7 @@ void InformationPanelContent::refreshMetaData() { - if (!m_item.isNull() && m_item.nepomukUri().isValid()) { + if (!m_item.isNull()) { showItem(m_item); } } diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/panels/information/informationpanelcontent.h netrunner-desktop-containment-4.13.0/dolphin/src/panels/information/informationpanelcontent.h --- netrunner-desktop-containment-4.11.1/dolphin/src/panels/information/informationpanelcontent.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/panels/information/informationpanelcontent.h 2014-05-26 15:31:22.000000000 +0000 @@ -20,12 +20,14 @@ #ifndef INFORMATIONPANELCONTENT_H #define INFORMATIONPANELCONTENT_H -#include "config-nepomuk.h" +#include "config-baloo.h" #include #include #include #include +#include + class KFileItemList; class PhononWidget; class PixmapViewer; @@ -35,10 +37,14 @@ class QLabel; class QScrollArea; -#ifndef HAVE_NEPOMUK +namespace KIO { + class PreviewJob; +} + +#ifndef HAVE_BALOO class KFileMetaDataWidget; #else -namespace Nepomuk2 { +namespace Baloo { class FileMetaDataWidget; } #endif @@ -135,16 +141,16 @@ private: KFileItem m_item; - bool m_pendingPreview; + QPointer m_previewJob; QTimer* m_outdatedPreviewTimer; PixmapViewer* m_preview; PhononWidget* m_phononWidget; QLabel* m_nameLabel; -#ifndef HAVE_NEPOMUK +#ifndef HAVE_BALOO KFileMetaDataWidget* m_metaDataWidget; #else - Nepomuk2::FileMetaDataWidget* m_metaDataWidget; + Baloo::FileMetaDataWidget* m_metaDataWidget; #endif QScrollArea* m_metaDataArea; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/panels/places/placesitem.cpp netrunner-desktop-containment-4.13.0/dolphin/src/panels/places/placesitem.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/panels/places/placesitem.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/panels/places/placesitem.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -120,6 +120,10 @@ void PlacesItem::setBookmark(const KBookmark& bookmark) { + if (bookmark == m_bookmark) { + return; + } + m_bookmark = bookmark; delete m_access; @@ -131,7 +135,7 @@ const QString udi = bookmark.metaDataItem("UDI"); if (udi.isEmpty()) { setIcon(bookmark.icon()); - setText(bookmark.text()); + setText(i18nc("KFile System Bookmarks", bookmark.text().toUtf8().data())); setUrl(bookmark.url()); } else { initializeDevice(udi); @@ -302,7 +306,15 @@ if (role == "iconName") { m_bookmark.setIcon(icon()); } else if (role == "text") { - m_bookmark.setFullText(text()); + // Only store the text in the KBookmark if it is not the translation of + // the current text. This makes sure that the text is re-translated if + // the user chooses another language, or the translation itself changes. + // + // NOTE: It is important to use "KFile System Bookmarks" as context + // (see PlacesItemModel::createSystemBookmarks()). + if (text() != i18nc("KFile System Bookmarks", m_bookmark.text().toUtf8().data())) { + m_bookmark.setFullText(text()); + } } else if (role == "url") { m_bookmark.setUrl(url()); } else if (role == "udi)") { diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/panels/places/placesitemmodel.cpp netrunner-desktop-containment-4.13.0/dolphin/src/panels/places/placesitemmodel.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/panels/places/placesitemmodel.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/panels/places/placesitemmodel.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -51,22 +51,17 @@ #include #include -#ifdef HAVE_NEPOMUK - #include - #include - #include - #include - #include - #include - #include +#ifdef HAVE_BALOO + #include + #include #endif namespace { // As long as KFilePlacesView from kdelibs is available in parallel, the // system-bookmarks for "Recently Accessed" and "Search For" should be // shown only inside the Places Panel. This is necessary as the stored - // URLs needs to get translated to a Nepomuk-search-URL on-the-fly to - // be independent from changes in the Nepomuk-search-URL-syntax. + // URLs needs to get translated to a Baloo-search-URL on-the-fly to + // be independent from changes in the Baloo-search-URL-syntax. // Hence a prefix to the application-name of the stored bookmarks is // added, which is only read by PlacesItemModel. const char* AppNamePrefix = "-places-panel"; @@ -87,16 +82,9 @@ m_updateBookmarksTimer(0), m_storageSetupInProgress() { -#ifdef HAVE_NEPOMUK - Nepomuk2::ResourceManager* rm = Nepomuk2::ResourceManager::instance(); - connect(rm, SIGNAL(nepomukSystemStarted()), this, SLOT(slotNepomukStarted())); - connect(rm, SIGNAL(nepomukSystemStopped()), this, SLOT(slotNepomukStopped())); - - if (rm->initialized()) { - KConfig config("nepomukserverrc"); - m_fileIndexingEnabled = config.group("Service-nepomukfileindexer").readEntry("autostart", true); - } - +#ifdef HAVE_BALOO + Baloo::IndexerConfig config; + m_fileIndexingEnabled = config.fileIndexingEnabled(); #endif const QString file = KStandardDirs::locateLocal("data", "kfileplaces/bookmarks.xml"); m_bookmarkManager = KBookmarkManager::managerForFile(file, "kfilePlaces"); @@ -377,7 +365,7 @@ } } -QMimeData* PlacesItemModel::createMimeData(const QSet& indexes) const +QMimeData* PlacesItemModel::createMimeData(const KItemSet& indexes) const { KUrl::List urls; QByteArray itemData; @@ -959,35 +947,6 @@ KStandardItemModel::clear(); } -void PlacesItemModel::slotNepomukStarted() -{ - KConfig config("nepomukserverrc"); - m_fileIndexingEnabled = config.group("Service-nepomukfileindexer").readEntry("autostart", true); - if (m_fileIndexingEnabled) { - m_systemBookmarks.clear(); - m_systemBookmarksIndexes.clear(); - createSystemBookmarks(); - - clear(); - loadBookmarks(); - } -} - -void PlacesItemModel::slotNepomukStopped() -{ - if (m_fileIndexingEnabled) { - m_fileIndexingEnabled = false; - - m_systemBookmarks.clear(); - m_systemBookmarksIndexes.clear(); - createSystemBookmarks(); - - clear(); - loadBookmarks(); - } -} - - void PlacesItemModel::initializeAvailableDevices() { QString predicate("[[[[ StorageVolume.ignored == false AND [ StorageVolume.usage == 'FileSystem' OR StorageVolume.usage == 'Encrypted' ]]" @@ -1145,7 +1104,7 @@ KUrl PlacesItemModel::createTimelineUrl(const KUrl& url) { - // TODO: Clarify with the Nepomuk-team whether it makes sense + // TODO: Clarify with the Baloo-team whether it makes sense // provide default-timeline-URLs like 'yesterday', 'this month' // and 'last month'. KUrl timelineUrl; @@ -1195,18 +1154,16 @@ { KUrl searchUrl; -#ifdef HAVE_NEPOMUK +#ifdef HAVE_BALOO const QString path = url.pathOrUrl(); if (path.endsWith(QLatin1String("documents"))) { - searchUrl = searchUrlForTerm(Nepomuk2::Query::ResourceTypeTerm(Nepomuk2::Vocabulary::NFO::Document())); + searchUrl = searchUrlForType("Document"); } else if (path.endsWith(QLatin1String("images"))) { - searchUrl = searchUrlForTerm(Nepomuk2::Query::ResourceTypeTerm(Nepomuk2::Vocabulary::NFO::Image())); + searchUrl = searchUrlForType("Image"); } else if (path.endsWith(QLatin1String("audio"))) { - searchUrl = searchUrlForTerm(Nepomuk2::Query::ComparisonTerm(Nepomuk2::Vocabulary::NIE::mimeType(), - Nepomuk2::Query::LiteralTerm("audio"))); + searchUrl = searchUrlForType("Audio"); } else if (path.endsWith(QLatin1String("videos"))) { - searchUrl = searchUrlForTerm(Nepomuk2::Query::ComparisonTerm(Nepomuk2::Vocabulary::NIE::mimeType(), - Nepomuk2::Query::LiteralTerm("video"))); + searchUrl = searchUrlForType("Video"); } else { Q_ASSERT(false); } @@ -1217,10 +1174,13 @@ return searchUrl; } -#ifdef HAVE_NEPOMUK -KUrl PlacesItemModel::searchUrlForTerm(const Nepomuk2::Query::Term& term) +#ifdef HAVE_BALOO +KUrl PlacesItemModel::searchUrlForType(const QString& type) { - const Nepomuk2::Query::FileQuery query(term); + Baloo::Query query; + query.addType("File"); + query.addType(type); + return query.toSearchUrl(); } #endif diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/panels/places/placesitemmodel.h netrunner-desktop-containment-4.13.0/dolphin/src/panels/places/placesitemmodel.h --- netrunner-desktop-containment-4.11.1/dolphin/src/panels/places/placesitemmodel.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/panels/places/placesitemmodel.h 2014-05-26 15:31:22.000000000 +0000 @@ -20,7 +20,7 @@ #ifndef PLACESITEMMODEL_H #define PLACESITEMMODEL_H -#include +#include #include @@ -37,16 +37,6 @@ class QAction; class QTimer; -#ifdef HAVE_NEPOMUK - namespace Nepomuk2 - { - namespace Query - { - class Term; - } - } -#endif - // #define PLACESITEMMODEL_DEBUG /** @@ -118,7 +108,7 @@ void requestStorageSetup(int index); /** @reimp */ - virtual QMimeData* createMimeData(const QSet& indexes) const; + virtual QMimeData* createMimeData(const KItemSet& indexes) const; /** @reimp */ virtual bool supportsDropping(int index) const; @@ -127,7 +117,7 @@ /** * @return Converts the URL, which contains "virtual" URLs for system-items like - * "search:/documents" into a Nepomuk-Query-URL that will be handled by + * "search:/documents" into a Query-URL that will be handled by * the corresponding IO-slave. Virtual URLs for bookmarks are used to * be independent from internal format changes. */ @@ -163,9 +153,6 @@ * timeout of m_saveBookmarksTimer to prevent unnecessary savings. */ void saveBookmarks(); - - void slotNepomukStarted(); - void slotNepomukStopped(); private: struct SystemBookmarkData; @@ -252,13 +239,13 @@ */ static KUrl createSearchUrl(const KUrl& url); -#ifdef HAVE_NEPOMUK +#ifdef HAVE_BALOO /** - * Helper method for createSearchUrl(). + * Helper method for createSearchUrl() * @return URL that can be listed by KIO and results in searching - * for the given term. + * for the given type */ - static KUrl searchUrlForTerm(const Nepomuk2::Query::Term& term); + static KUrl searchUrlForType(const QString& type); #endif #ifdef PLACESITEMMODEL_DEBUG diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/panels/places/placespanel.cpp netrunner-desktop-containment-4.13.0/dolphin/src/panels/places/placespanel.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/panels/places/placespanel.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/panels/places/placespanel.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -283,8 +283,9 @@ } else if (action == hideAction) { item->setHidden(hideAction->isChecked()); } else if (action == openInNewTabAction) { - const KUrl url = m_model->item(index)->dataValue("url").value(); - emit placeMiddleClicked(url); + // TriggerItem does set up the storage first and then it will + // emit the slotItemMiddleClicked signal, because of Qt::MiddleButton. + triggerItem(index, Qt::MiddleButton); } else if (action == teardownAction) { m_model->requestTeardown(index); } else if (action == ejectAction) { diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/search/dolphinfacetswidget.cpp netrunner-desktop-containment-4.13.0/dolphin/src/search/dolphinfacetswidget.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/search/dolphinfacetswidget.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/search/dolphinfacetswidget.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -27,18 +27,6 @@ #include #include -#ifdef HAVE_NEPOMUK - #include - #include - #include - #include - #include - #include - #include - #include - #include -#endif - DolphinFacetsWidget::DolphinFacetsWidget(QWidget* parent) : QWidget(parent), m_documents(0), @@ -58,13 +46,16 @@ m_fourOrMore(0), m_maxRating(0) { - m_documents = createCheckBox(i18nc("@option:check", "Documents")); - m_images = createCheckBox(i18nc("@option:check", "Images")); - m_audio = createCheckBox(i18nc("@option:check", "Audio Files")); - m_videos = createCheckBox(i18nc("@option:check", "Videos")); + QButtonGroup* filetypeGroup = new QButtonGroup(this); + m_anyType = createRadioButton(i18nc("@option:check", "Any"), filetypeGroup); + m_documents = createRadioButton(i18nc("@option:check", "Documents"), filetypeGroup); + m_images = createRadioButton(i18nc("@option:check", "Images"), filetypeGroup); + m_audio = createRadioButton(i18nc("@option:check", "Audio Files"), filetypeGroup); + m_videos = createRadioButton(i18nc("@option:check", "Videos"), filetypeGroup); QVBoxLayout* typeLayout = new QVBoxLayout(); typeLayout->setSpacing(0); + typeLayout->addWidget(m_anyType); typeLayout->addWidget(m_documents); typeLayout->addWidget(m_images); typeLayout->addWidget(m_audio); @@ -112,6 +103,7 @@ topLayout->addLayout(ratingLayout); topLayout->addStretch(); + m_anyType->setChecked(true); m_anytime->setChecked(true); m_anyRating->setChecked(true); } @@ -120,38 +112,11 @@ { } -#ifdef HAVE_NEPOMUK -Nepomuk2::Query::Term DolphinFacetsWidget::facetsTerm() const +#ifdef HAVE_BALOO +Baloo::Term DolphinFacetsWidget::ratingTerm() const { - Nepomuk2::Query::AndTerm andTerm; - - const bool hasTypeFilter = m_documents->isChecked() || - m_images->isChecked() || - m_audio->isChecked() || - m_videos->isChecked(); - if (hasTypeFilter) { - Nepomuk2::Query::OrTerm orTerm; - - if (m_documents->isChecked()) { - orTerm.addSubTerm(Nepomuk2::Query::ResourceTypeTerm(Nepomuk2::Vocabulary::NFO::Document())); - } - - if (m_images->isChecked()) { - orTerm.addSubTerm(Nepomuk2::Query::ResourceTypeTerm(Nepomuk2::Vocabulary::NFO::Image())); - } - - if (m_audio->isChecked()) { - orTerm.addSubTerm(Nepomuk2::Query::ComparisonTerm(Nepomuk2::Vocabulary::NIE::mimeType(), - Nepomuk2::Query::LiteralTerm("audio"))); - } - - if (m_videos->isChecked()) { - orTerm.addSubTerm(Nepomuk2::Query::ComparisonTerm(Nepomuk2::Vocabulary::NIE::mimeType(), - Nepomuk2::Query::LiteralTerm("video"))); - } - - andTerm.addSubTerm(orTerm); - } + Baloo::Term ratingTerm; + Baloo::Term modifiedTerm; if (!m_anyRating->isChecked()) { int stars = 1; // represents m_oneOrMore @@ -166,10 +131,7 @@ } const int rating = stars * 2; - Nepomuk2::Query::ComparisonTerm term(Soprano::Vocabulary::NAO::numericRating(), - Nepomuk2::Query::LiteralTerm(rating), - Nepomuk2::Query::ComparisonTerm::GreaterOrEqual); - andTerm.addSubTerm(term); + ratingTerm = Baloo::Term("rating", rating, Baloo::Term::GreaterEqual); } if (!m_anytime->isChecked()) { @@ -184,21 +146,149 @@ date = date.addDays(1 - date.dayOfYear()); } - Nepomuk2::Query::ComparisonTerm term(Nepomuk2::Vocabulary::NIE::lastModified(), - Nepomuk2::Query::LiteralTerm(QDateTime(date)), - Nepomuk2::Query::ComparisonTerm::GreaterOrEqual); - andTerm.addSubTerm(term); + modifiedTerm = Baloo::Term("modified", date, Baloo::Term::GreaterEqual); + } + + if (ratingTerm.isValid() && modifiedTerm.isValid()) { + Baloo::Term term(Baloo::Term::And); + term.addSubTerm(ratingTerm); + term.addSubTerm(modifiedTerm); + + return term; + } else if (modifiedTerm.isValid()) { + return modifiedTerm; + } else if (ratingTerm.isValid()) { + return ratingTerm; + } + + return Baloo::Term(); +} + +QString DolphinFacetsWidget::facetType() const +{ + if (m_documents->isChecked()) { + return QLatin1String("Document"); + } else if (m_images->isChecked()) { + return QLatin1String("Image"); + } else if (m_audio->isChecked()) { + return QLatin1String("Audio"); + } else if (m_videos->isChecked()) { + return QLatin1String("Video"); } - return andTerm; + return QString(); } + +bool DolphinFacetsWidget::isRatingTerm(const Baloo::Term& term) const +{ + const QList subTerms = term.subTerms(); + if (subTerms.isEmpty()) { + // If term has no sub terms, then the term itself is either a "rating" term + // or a "modified" term. + return term.property() == QLatin1String("modified") || + term.property() == QLatin1String("rating"); + + } else if (subTerms.size() == 2) { + // If term has sub terms, then the sub terms are always "rating" and "modified" terms. + + QStringList properties; + foreach (const Baloo::Term& subTerm, subTerms) { + properties << subTerm.property(); + } + + return properties.contains(QLatin1String("modified")) && + properties.contains(QLatin1String("rating")); + } + + return false; +} + +void DolphinFacetsWidget::setRatingTerm(const Baloo::Term& term) +{ + // If term has sub terms, then the sub terms are always "rating" and "modified" terms. + // If term has no sub terms, then the term itself is either a "rating" term or a "modified" + // term. To avoid code duplication we add term to subTerms list, if the list is empty. + QList subTerms = term.subTerms(); + if (subTerms.isEmpty()) { + subTerms << term; + } + + foreach (const Baloo::Term& subTerm, subTerms) { + const QString property = subTerm.property(); + + if (property == QLatin1String("modified")) { + const QDate date = subTerm.value().toDate(); + setTimespan(date); + } else if (property == QLatin1String("rating")) { + const int stars = subTerm.value().toInt() / 2; + setRating(stars); + } + } +} + #endif -QCheckBox* DolphinFacetsWidget::createCheckBox(const QString& text) +void DolphinFacetsWidget::setFacetType(const QString& type) { - QCheckBox* checkBox = new QCheckBox(text); - connect(checkBox, SIGNAL(clicked()), this, SIGNAL(facetChanged())); - return checkBox; + if (type == QLatin1String("Document")) { + m_documents->setChecked(true); + } else if (type == QLatin1String("Image")) { + m_images->setChecked(true); + } else if (type == QLatin1String("Audio")) { + m_audio->setChecked(true); + } else if (type == QLatin1String("Video")) { + m_videos->setChecked(true); + } else { + m_anyType->setChecked(true); + } +} + +void DolphinFacetsWidget::setRating(const int stars) +{ + switch (stars) { + case 5: + m_maxRating->setChecked(true); + break; + + case 4: + m_fourOrMore->setChecked(true); + break; + + case 3: + m_threeOrMore->setChecked(true); + break; + + case 2: + m_twoOrMore->setChecked(true); + break; + + case 1: + m_oneOrMore->setChecked(true); + break; + + default: + m_anyRating->setChecked(true); + } +} + +void DolphinFacetsWidget::setTimespan(const QDate& date) +{ + const QDate currentDate = QDate::currentDate(); + const int days = date.daysTo(currentDate); + + if (days <= 0) { + m_today->setChecked(true); + } else if (days <= 1) { + m_yesterday->setChecked(true); + } else if (days <= currentDate.dayOfWeek()) { + m_thisWeek->setChecked(true); + } else if (days <= currentDate.day()) { + m_thisMonth->setChecked(true); + } else if (days <= currentDate.dayOfYear()) { + m_thisYear->setChecked(true); + } else { + m_anytime->setChecked(true); + } } QRadioButton* DolphinFacetsWidget::createRadioButton(const QString& text, diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/search/dolphinfacetswidget.h netrunner-desktop-containment-4.13.0/dolphin/src/search/dolphinfacetswidget.h --- netrunner-desktop-containment-4.11.1/dolphin/src/search/dolphinfacetswidget.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/search/dolphinfacetswidget.h 2014-05-26 15:31:22.000000000 +0000 @@ -22,13 +22,14 @@ #include -#include -#ifdef HAVE_NEPOMUK - #include +#include +#ifdef HAVE_BALOO + #include #endif class QButtonGroup; class QCheckBox; +class QDate; class QRadioButton; /** @@ -55,20 +56,22 @@ explicit DolphinFacetsWidget(QWidget* parent = 0); virtual ~DolphinFacetsWidget(); -#ifdef HAVE_NEPOMUK - Nepomuk2::Query::Term facetsTerm() const; +#ifdef HAVE_BALOO + Baloo::Term ratingTerm() const; + QString facetType() const; + + bool isRatingTerm(const Baloo::Term& term) const; + void setRatingTerm(const Baloo::Term& term); #endif + void setFacetType(const QString& type); + signals: void facetChanged(); private: - /** - * @return New checkbox which is connected to the - * slotFacedChanged() slot whenever it has - * been toggled. - */ - QCheckBox* createCheckBox(const QString& text); + void setRating(const int stars); + void setTimespan(const QDate& date); /** * @return New radiobutton which is connected to the @@ -79,10 +82,11 @@ QButtonGroup* group); private: - QCheckBox* m_documents; - QCheckBox* m_images; - QCheckBox* m_audio; - QCheckBox* m_videos; + QRadioButton* m_anyType; + QRadioButton* m_documents; + QRadioButton* m_images; + QRadioButton* m_audio; + QRadioButton* m_videos; QRadioButton* m_anytime; QRadioButton* m_today; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/search/dolphinsearchbox.cpp netrunner-desktop-containment-4.13.0/dolphin/src/search/dolphinsearchbox.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/search/dolphinsearchbox.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/search/dolphinsearchbox.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -21,7 +21,6 @@ #include "dolphin_searchsettings.h" #include "dolphinfacetswidget.h" -#include "dolphinsearchinformation.h" #include #include @@ -40,24 +39,16 @@ #include #include -#include -#ifdef HAVE_NEPOMUK - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include +#include +#ifdef HAVE_BALOO + #include + #include + #include #endif DolphinSearchBox::DolphinSearchBox(QWidget* parent) : QWidget(parent), m_startedSearching(false), - m_readOnly(false), m_active(true), m_topLayout(0), m_searchLabel(0), @@ -71,7 +62,6 @@ m_facetsToggleButton(0), m_facetsWidget(0), m_searchPath(), - m_readOnlyQuery(), m_startSearchTimer(0) { } @@ -110,13 +100,16 @@ const QString elidedLocation = metrics.elidedText(location, Qt::ElideMiddle, maxWidth); m_fromHereButton->setText(i18nc("action:button", "From Here (%1)", elidedLocation)); - const bool showSearchFromButtons = url.isLocalFile() && !m_readOnly; + const bool showSearchFromButtons = url.isLocalFile(); m_separator->setVisible(showSearchFromButtons); m_fromHereButton->setVisible(showSearchFromButtons); m_everywhereButton->setVisible(showSearchFromButtons); - const DolphinSearchInformation& searchInfo = DolphinSearchInformation::instance(); - const bool hasFacetsSupport = searchInfo.isIndexingEnabled() && searchInfo.isPathIndexed(m_searchPath); + bool hasFacetsSupport = false; +#ifdef HAVE_BALOO + const Baloo::IndexerConfig searchInfo; + hasFacetsSupport = searchInfo.fileIndexingEnabled() && searchInfo.shouldBeIndexed(m_searchPath.toLocalFile()); +#endif m_facetsWidget->setEnabled(hasFacetsSupport); } @@ -128,9 +121,13 @@ KUrl DolphinSearchBox::urlForSearching() const { KUrl url; - const DolphinSearchInformation& searchInfo = DolphinSearchInformation::instance(); - if (searchInfo.isIndexingEnabled() && searchInfo.isPathIndexed(m_searchPath)) { - url = nepomukUrlForSearching(); + bool useBalooSearch = false; +#ifdef HAVE_BALOO + const Baloo::IndexerConfig searchInfo; + useBalooSearch = searchInfo.fileIndexingEnabled() && searchInfo.shouldBeIndexed(m_searchPath.toLocalFile()); +#endif + if (useBalooSearch) { + url = balooUrlForSearching(); } else { url.setProtocol("filenamesearch"); url.addQueryItem("search", m_searchInput->text()); @@ -153,23 +150,24 @@ return url; } -void DolphinSearchBox::selectAll() -{ - m_searchInput->selectAll(); -} - -void DolphinSearchBox::setReadOnly(bool readOnly, const KUrl& query) +void DolphinSearchBox::fromSearchUrl(const KUrl& url) { - if (m_readOnly != readOnly || m_readOnlyQuery != query) { - m_readOnly = readOnly; - m_readOnlyQuery = query; - applyReadOnlyState(); + if (url.protocol() == "baloosearch") { + fromBalooSearchUrl(url); + } else if (url.protocol() == "filenamesearch") { + const QMap& queryItems = url.queryItems(); + setText(queryItems.value("search")); + setSearchPath(queryItems.value("url")); + m_contentButton->setChecked(queryItems.value("checkContent") == "yes"); + } else { + setText(QString()); + setSearchPath(url); } } -bool DolphinSearchBox::isReadOnly() const +void DolphinSearchBox::selectAll() { - return m_readOnly; + m_searchInput->selectAll(); } void DolphinSearchBox::setActive(bool active) @@ -427,80 +425,83 @@ connect(m_startSearchTimer, SIGNAL(timeout()), this, SLOT(emitSearchRequest())); updateFacetsToggleButton(); - applyReadOnlyState(); } -KUrl DolphinSearchBox::nepomukUrlForSearching() const +KUrl DolphinSearchBox::balooUrlForSearching() const { -#ifdef HAVE_NEPOMUK - // Create the term for the text from the input-field - // dependent on whether a searching for content or - // filename is done +#ifdef HAVE_BALOO const QString text = m_searchInput->text(); - Nepomuk2::Query::Term searchLabelTerm; + + Baloo::Query query; + query.addType("File"); + query.addType(m_facetsWidget->facetType()); + + Baloo::Term term(Baloo::Term::And); + + Baloo::Term ratingTerm = m_facetsWidget->ratingTerm(); + if (ratingTerm.isValid()) { + term.addSubTerm(ratingTerm); + } + if (m_contentButton->isChecked()) { - // Let Nepomuk parse the query - searchLabelTerm = Nepomuk2::Query::QueryParser::parseQuery(text, Nepomuk2::Query::QueryParser::DetectFilenamePattern).term(); - } else { - // Search the text in the filename only - QString regex = QRegExp::escape(text); - regex.replace("\\*", QLatin1String(".*")); - regex.replace("\\?", QLatin1String(".")); - regex.replace("\\", "\\\\"); - searchLabelTerm = Nepomuk2::Query::ComparisonTerm( - Nepomuk2::Vocabulary::NFO::fileName(), - Nepomuk2::Query::LiteralTerm(regex), - Nepomuk2::Query::ComparisonTerm::Regexp); - } - - // Get the term from the facets and merge it with the - // created term from the input-field. - Nepomuk2::Query::Term facetsTerm = m_facetsWidget->facetsTerm(); - - Nepomuk2::Query::FileQuery fileQuery; - fileQuery.setFileMode(Nepomuk2::Query::FileQuery::QueryFilesAndFolders); - if (facetsTerm.isValid()) { - Nepomuk2::Query::AndTerm andTerm; - andTerm.addSubTerm(searchLabelTerm); - andTerm.addSubTerm(facetsTerm); - fileQuery.setTerm(andTerm); - } else { - fileQuery.setTerm(searchLabelTerm); + query.setSearchString(text); + } else if (!text.isEmpty()) { + term.addSubTerm(Baloo::Term(QLatin1String("filename"), text)); } if (m_fromHereButton->isChecked()) { - const bool recursive = true; - fileQuery.addIncludeFolder(m_searchPath, recursive); + query.addCustomOption("includeFolder", m_searchPath.toLocalFile()); } - return fileQuery.toSearchUrl(i18nc("@title UDS_DISPLAY_NAME for a KIO directory listing. %1 is the query the user entered.", - "Query Results from '%1'", - text)); + query.setTerm(term); + + return query.toSearchUrl(i18nc("@title UDS_DISPLAY_NAME for a KIO directory listing. %1 is the query the user entered.", + "Query Results from '%1'", text)); #else return KUrl(); #endif } -void DolphinSearchBox::applyReadOnlyState() +void DolphinSearchBox::fromBalooSearchUrl(const KUrl& url) { -#ifdef HAVE_NEPOMUK - if (m_readOnly) { - m_searchLabel->setText(Nepomuk2::Query::Query::titleFromQueryUrl(m_readOnlyQuery)); +#ifdef HAVE_BALOO + const Baloo::Query query = Baloo::Query::fromSearchUrl(url); + const Baloo::Term term = query.term(); + + // Block all signals to avoid unnecessary "searchRequest" signals + // while we adjust the search text and the facet widget. + blockSignals(true); + + const QVariantHash customOptions = query.customOptions(); + if (customOptions.contains("includeFolder")) { + setSearchPath(customOptions.value("includeFolder").toString()); } else { -#else - { -#endif - m_searchLabel->setText(i18nc("@label:textbox", "Find:")); + setSearchPath(QDir::homePath()); } - m_searchInput->setVisible(!m_readOnly); - m_optionsScrollArea->setVisible(!m_readOnly); + if (!query.searchString().isEmpty()) { + setText(query.searchString()); + } - if (m_readOnly) { - m_facetsWidget->hide(); - } else { - m_facetsWidget->setVisible(SearchSettings::showFacetsWidget()); + QStringList types = query.types(); + types.removeOne("File"); // We are only interested in facet widget types + if (!types.isEmpty()) { + m_facetsWidget->setFacetType(types.first()); } + + foreach (const Baloo::Term& subTerm, term.subTerms()) { + const QString property = subTerm.property(); + + if (property == QLatin1String("filename")) { + setText(subTerm.value().toString()); + } else if (m_facetsWidget->isRatingTerm(subTerm)) { + m_facetsWidget->setRatingTerm(subTerm); + } + } + + m_startSearchTimer->stop(); + blockSignals(false); +#endif } void DolphinSearchBox::updateFacetsToggleButton() diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/search/dolphinsearchbox.h netrunner-desktop-containment-4.13.0/dolphin/src/search/dolphinsearchbox.h --- netrunner-desktop-containment-4.11.1/dolphin/src/search/dolphinsearchbox.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/search/dolphinsearchbox.h 2014-05-26 15:31:22.000000000 +0000 @@ -33,13 +33,13 @@ class QVBoxLayout; /** - * @brief Input box for searching files with or without Nepomuk. + * @brief Input box for searching files with or without Baloo. * * The widget allows to specify: * - Where to search: Everywhere or below the current directory * - What to search: Filenames or content * - * If Nepomuk is available and the current folder is indexed, further + * If Baloo is available and the current folder is indexed, further * options are offered. */ class DolphinSearchBox : public QWidget { @@ -72,20 +72,15 @@ KUrl urlForSearching() const; /** - * Selects the whole text of the search box. + * Extracts information from the given search \a url to + * initialize the search box properly. */ - void selectAll(); + void fromSearchUrl(const KUrl& url); /** - * @param readOnly If set to true the searchbox cannot be modified - * by the user and acts as visual indicator for - * an externally triggered search query. - * @param query If readOnly is true this URL will be used - * to show a human readable information about the - * query. + * Selects the whole text of the search box. */ - void setReadOnly(bool readOnly, const KUrl& query = KUrl()); - bool isReadOnly() const; + void selectAll(); /** * Set the search box to the active mode, if \a active @@ -151,16 +146,19 @@ void init(); /** - * @return URL that represents the Nepomuk query for starting the search. + * @return URL that represents the Baloo query for starting the search. */ - KUrl nepomukUrlForSearching() const; + KUrl balooUrlForSearching() const; - void applyReadOnlyState(); + /** + * Extracts information from the given Baloo search \a url to + * initialize the search box properly. + */ + void fromBalooSearchUrl(const KUrl& url); void updateFacetsToggleButton(); private: bool m_startedSearching; - bool m_readOnly; bool m_active; QVBoxLayout* m_topLayout; @@ -177,7 +175,6 @@ DolphinFacetsWidget* m_facetsWidget; KUrl m_searchPath; - KUrl m_readOnlyQuery; QTimer* m_startSearchTimer; }; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/search/dolphinsearchinformation.cpp netrunner-desktop-containment-4.13.0/dolphin/src/search/dolphinsearchinformation.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/search/dolphinsearchinformation.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/search/dolphinsearchinformation.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,124 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ - -#include "dolphinsearchinformation.h" - -#include -#ifdef HAVE_NEPOMUK - #include - #include - #include -#endif - -#include -#include -#include -#include - -struct DolphinSearchInformationSingleton -{ - DolphinSearchInformation instance; -}; -K_GLOBAL_STATIC(DolphinSearchInformationSingleton, s_dolphinSearchInformation) - - -DolphinSearchInformation& DolphinSearchInformation::instance() -{ - return s_dolphinSearchInformation->instance; -} - -DolphinSearchInformation::~DolphinSearchInformation() -{ -} - -bool DolphinSearchInformation::isIndexingEnabled() const -{ - return m_indexingEnabled; -} - -namespace { - /// recursively check if a folder is hidden - bool isDirHidden( QDir& dir ) { - if (QFileInfo(dir.path()).isHidden()) { - return true; - } else if (dir.cdUp()) { - return isDirHidden(dir); - } else { - return false; - } - } - - bool isDirHidden(const QString& path) { - QDir dir(path); - return isDirHidden(dir); - } -} - -bool DolphinSearchInformation::isPathIndexed(const KUrl& url) const -{ -#ifdef HAVE_NEPOMUK - const KConfig strigiConfig("nepomukstrigirc"); - const QStringList indexedFolders = strigiConfig.group("General").readPathEntry("folders", QStringList()); - - // Nepomuk does not index hidden folders - if (isDirHidden(url.toLocalFile())) { - return false; - } - - // Check whether the path is part of an indexed folder - bool isIndexed = false; - foreach (const QString& indexedFolder, indexedFolders) { - const KUrl indexedPath(indexedFolder); - if (indexedPath.isParentOf(url)) { - isIndexed = true; - break; - } - } - - if (isIndexed) { - // The path is part of an indexed folder. Check whether no - // excluded folder is part of the path. - const QStringList excludedFolders = strigiConfig.group("General").readPathEntry("exclude folders", QStringList()); - foreach (const QString& excludedFolder, excludedFolders) { - const KUrl excludedPath(excludedFolder); - if (excludedPath.isParentOf(url)) { - isIndexed = false; - break; - } - } - } - - return isIndexed; -#else - Q_UNUSED(url); - return false; -#endif -} - -DolphinSearchInformation::DolphinSearchInformation() : - m_indexingEnabled(false) -{ -#ifdef HAVE_NEPOMUK - if (Nepomuk2::ResourceManager::instance()->initialized()) { - KConfig config("nepomukserverrc"); - m_indexingEnabled = config.group("Service-nepomukfileindexer").readEntry("autostart", true); - } -#endif -} - diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/search/dolphinsearchinformation.h netrunner-desktop-containment-4.13.0/dolphin/src/search/dolphinsearchinformation.h --- netrunner-desktop-containment-4.11.1/dolphin/src/search/dolphinsearchinformation.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/search/dolphinsearchinformation.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ - -#ifndef DOLPHINSEARCHINFORMATION_H -#define DOLPHINSEARCHINFORMATION_H - -class KUrl; - -/** - * @brief Allows to access search-engine related information. - */ -class DolphinSearchInformation -{ -public: - static DolphinSearchInformation& instance(); - virtual ~DolphinSearchInformation(); - - /** - * @return True if the Nepomuk indexer is enabled. If Nepomuk is - * disabled, always false is returned. - */ - bool isIndexingEnabled() const; - - /** - * @return True if the complete directory tree specified by path - * is indexed by the Nepomuk indexer. If Nepomuk is disabled, - * always false is returned. - */ - bool isPathIndexed(const KUrl& url) const; - -protected: - DolphinSearchInformation(); - -private: - bool m_indexingEnabled; - - friend class DolphinSearchInformationSingleton; -}; - -#endif - diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/search/filenamesearchprotocol.cpp netrunner-desktop-containment-4.13.0/dolphin/src/search/filenamesearchprotocol.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/search/filenamesearchprotocol.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/search/filenamesearchprotocol.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -91,7 +91,7 @@ bool addItem = false; if (!m_regExp || item.name().contains(*m_regExp)) { addItem = true; - } else if (m_checkContent && item.mimetype().startsWith(QLatin1String("text/"))) { + } else if (m_checkContent && item.determineMimeType()->is(QLatin1String("text/plain"))) { addItem = contentContainsPattern(item.url()); } diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/settings/additionalinfodialog.cpp netrunner-desktop-containment-4.13.0/dolphin/src/settings/additionalinfodialog.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/settings/additionalinfodialog.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/settings/additionalinfodialog.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -19,7 +19,7 @@ #include "additionalinfodialog.h" -#include +#include #include #include "kitemviews/kfileitemmodel.h" @@ -27,8 +27,8 @@ #include #include -#ifdef HAVE_NEPOMUK - #include +#ifdef HAVE_BALOO + #include #endif AdditionalInfoDialog::AdditionalInfoDialog(QWidget* parent, @@ -50,14 +50,10 @@ header->setWordWrap(true); // Add checkboxes - bool nepomukRunning = false; bool indexingEnabled = false; -#ifdef HAVE_NEPOMUK - nepomukRunning = (Nepomuk2::ResourceManager::instance()->initialized()); - if (nepomukRunning) { - KConfig config("nepomukserverrc"); - indexingEnabled = config.group("Service-nepomukfileindexer").readEntry("autostart", true); - } +#ifdef HAVE_BALOO + Baloo::IndexerConfig config; + indexingEnabled = config.fileIndexingEnabled(); #endif m_listWidget = new QListWidget(mainWidget); @@ -67,8 +63,8 @@ QListWidgetItem* item = new QListWidgetItem(info.translation, m_listWidget); item->setCheckState(visibleRoles.contains(info.role) ? Qt::Checked : Qt::Unchecked); - const bool enable = (!info.requiresNepomuk && !info.requiresIndexer) || - (info.requiresNepomuk && nepomukRunning) || + const bool enable = (!info.requiresBaloo && !info.requiresIndexer) || + (info.requiresBaloo) || (info.requiresIndexer && indexingEnabled); if (!enable) { @@ -79,7 +75,6 @@ QVBoxLayout* layout = new QVBoxLayout(mainWidget); layout->addWidget(header); layout->addWidget(m_listWidget); - layout->addStretch(1); setMainWidget(mainWidget); diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/settings/kcm/kcmdolphingeneral.desktop netrunner-desktop-containment-4.13.0/dolphin/src/settings/kcm/kcmdolphingeneral.desktop --- netrunner-desktop-containment-4.11.1/dolphin/src/settings/kcm/kcmdolphingeneral.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/settings/kcm/kcmdolphingeneral.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -297,6 +297,7 @@ Comment[zh_TW]=設定一般檔案管理員 X-KDE-Keywords=file manager X-KDE-Keywords[ar]=مدير الملفات +X-KDE-Keywords[bg]=преглед на файлове X-KDE-Keywords[bs]=upravitelj datoteka X-KDE-Keywords[ca]=gestor de fitxers X-KDE-Keywords[ca@valencia]=gestor de fitxers @@ -310,8 +311,10 @@ X-KDE-Keywords[fr]=gestionnaire de fichiers X-KDE-Keywords[ga]=bainisteoir comhad X-KDE-Keywords[gl]=xestor de ficheiros +X-KDE-Keywords[he]=מנהל קבצים X-KDE-Keywords[hu]=fájlkezelő X-KDE-Keywords[ia]=gerente de file +X-KDE-Keywords[is]=skráastjóri X-KDE-Keywords[it]=gestore dei file X-KDE-Keywords[kk]=file manager X-KDE-Keywords[km]=កម្មវិធី​គ្រប់គ្រង​ឯកសារ diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/settings/kcm/kcmdolphinnavigation.desktop netrunner-desktop-containment-4.13.0/dolphin/src/settings/kcm/kcmdolphinnavigation.desktop --- netrunner-desktop-containment-4.11.1/dolphin/src/settings/kcm/kcmdolphinnavigation.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/settings/kcm/kcmdolphinnavigation.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -297,6 +297,7 @@ Comment[zh_TW]=設定檔案管理員導覽 X-KDE-Keywords=file manager X-KDE-Keywords[ar]=مدير الملفات +X-KDE-Keywords[bg]=преглед на файлове X-KDE-Keywords[bs]=upravitelj datoteka X-KDE-Keywords[ca]=gestor de fitxers X-KDE-Keywords[ca@valencia]=gestor de fitxers @@ -310,8 +311,10 @@ X-KDE-Keywords[fr]=gestionnaire de fichiers X-KDE-Keywords[ga]=bainisteoir comhad X-KDE-Keywords[gl]=xestor de ficheiros +X-KDE-Keywords[he]=מנהל קבצים X-KDE-Keywords[hu]=fájlkezelő X-KDE-Keywords[ia]=gerente de file +X-KDE-Keywords[is]=skráastjóri X-KDE-Keywords[it]=gestore dei file X-KDE-Keywords[kk]=file manager X-KDE-Keywords[km]=កម្មវិធី​គ្រប់គ្រង​ឯកសារ diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/settings/kcm/kcmdolphinservices.desktop netrunner-desktop-containment-4.13.0/dolphin/src/settings/kcm/kcmdolphinservices.desktop --- netrunner-desktop-containment-4.11.1/dolphin/src/settings/kcm/kcmdolphinservices.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/settings/kcm/kcmdolphinservices.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -246,6 +246,7 @@ Comment[zh_TW]=設定檔案管理員服務 X-KDE-Keywords=file manager X-KDE-Keywords[ar]=مدير الملفات +X-KDE-Keywords[bg]=преглед на файлове X-KDE-Keywords[bs]=upravitelj datoteka X-KDE-Keywords[ca]=gestor de fitxers X-KDE-Keywords[ca@valencia]=gestor de fitxers @@ -259,8 +260,10 @@ X-KDE-Keywords[fr]=gestionnaire de fichiers X-KDE-Keywords[ga]=bainisteoir comhad X-KDE-Keywords[gl]=xestor de ficheiros +X-KDE-Keywords[he]=מנהל קבצים X-KDE-Keywords[hu]=fájlkezelő X-KDE-Keywords[ia]=gerente de file +X-KDE-Keywords[is]=skráastjóri X-KDE-Keywords[it]=gestore dei file X-KDE-Keywords[kk]=file manager X-KDE-Keywords[km]=កម្មវិធី​គ្រប់គ្រង​ឯកសារ diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/settings/kcm/kcmdolphinviewmodes.desktop netrunner-desktop-containment-4.13.0/dolphin/src/settings/kcm/kcmdolphinviewmodes.desktop --- netrunner-desktop-containment-4.11.1/dolphin/src/settings/kcm/kcmdolphinviewmodes.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/settings/kcm/kcmdolphinviewmodes.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -295,6 +295,7 @@ Comment[zh_TW]=設定檔案管理員檢視模式 X-KDE-Keywords=file manager X-KDE-Keywords[ar]=مدير الملفات +X-KDE-Keywords[bg]=преглед на файлове X-KDE-Keywords[bs]=upravitelj datoteka X-KDE-Keywords[ca]=gestor de fitxers X-KDE-Keywords[ca@valencia]=gestor de fitxers @@ -308,8 +309,10 @@ X-KDE-Keywords[fr]=gestionnaire de fichiers X-KDE-Keywords[ga]=bainisteoir comhad X-KDE-Keywords[gl]=xestor de ficheiros +X-KDE-Keywords[he]=מנהל קבצים X-KDE-Keywords[hu]=fájlkezelő X-KDE-Keywords[ia]=gerente de file +X-KDE-Keywords[is]=skráastjóri X-KDE-Keywords[it]=gestore dei file X-KDE-Keywords[kk]=file manager X-KDE-Keywords[km]=កម្មវិធី​គ្រប់គ្រង​ឯកសារ diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/settings/viewpropertiesdialog.cpp netrunner-desktop-containment-4.13.0/dolphin/src/settings/viewpropertiesdialog.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/settings/viewpropertiesdialog.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/settings/viewpropertiesdialog.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -27,10 +27,7 @@ #include "dolphin_iconsmodesettings.h" #include "viewpropsprogressinfo.h" -#include -#ifdef HAVE_NEPOMUK -#include -#endif +#include #include #include diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/statusbar/dolphinstatusbar.cpp netrunner-desktop-containment-4.13.0/dolphin/src/statusbar/dolphinstatusbar.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/statusbar/dolphinstatusbar.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/statusbar/dolphinstatusbar.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -73,6 +73,7 @@ m_zoomSlider->setRange(ZoomLevelInfo::minimumLevel(), ZoomLevelInfo::maximumLevel()); connect(m_zoomSlider, SIGNAL(valueChanged(int)), this, SIGNAL(zoomLevelChanged(int))); + connect(m_zoomSlider, SIGNAL(valueChanged(int)), this, SLOT(updateZoomSliderToolTip(int))); connect(m_zoomSlider, SIGNAL(sliderMoved(int)), this, SLOT(showZoomSliderToolTip(int))); // Initialize space information @@ -240,7 +241,6 @@ { if (zoomLevel != m_zoomSlider->value()) { m_zoomSlider->setValue(zoomLevel); - updateZoomSliderToolTip(zoomLevel); } } @@ -338,6 +338,12 @@ updateLabelText(); } +void DolphinStatusBar::updateZoomSliderToolTip(int zoomLevel) +{ + const int size = ZoomLevelInfo::iconSizeForZoomLevel(zoomLevel); + m_zoomSlider->setToolTip(i18ncp("@info:tooltip", "Size: 1 pixel", "Size: %1 pixels", size)); +} + void DolphinStatusBar::setExtensionsVisible(bool visible) { bool showSpaceInfo = visible; @@ -350,10 +356,4 @@ m_zoomSlider->setVisible(showZoomSlider); } -void DolphinStatusBar::updateZoomSliderToolTip(int zoomLevel) -{ - const int size = ZoomLevelInfo::iconSizeForZoomLevel(zoomLevel); - m_zoomSlider->setToolTip(i18ncp("@info:tooltip", "Size: 1 pixel", "Size: %1 pixels", size)); -} - #include "dolphinstatusbar.moc" diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/statusbar/dolphinstatusbar.h netrunner-desktop-containment-4.13.0/dolphin/src/statusbar/dolphinstatusbar.h --- netrunner-desktop-containment-4.11.1/dolphin/src/statusbar/dolphinstatusbar.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/statusbar/dolphinstatusbar.h 2014-05-26 15:31:22.000000000 +0000 @@ -122,6 +122,12 @@ */ void slotResetToDefaultText(); + /** + * Updates the text of the zoom slider tooltip to show + * the currently used size. + */ + void updateZoomSliderToolTip(int zoomLevel); + private: /** * Makes the space information widget and zoom slider widget @@ -131,12 +137,6 @@ */ void setExtensionsVisible(bool visible); - /** - * Updates the text of the zoom slider tooltip to show - * the currently used size. - */ - void updateZoomSliderToolTip(int zoomLevel); - private: QString m_text; QString m_defaultText; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/tests/CMakeLists.txt netrunner-desktop-containment-4.13.0/dolphin/src/tests/CMakeLists.txt --- netrunner-desktop-containment-4.11.1/dolphin/src/tests/CMakeLists.txt 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/tests/CMakeLists.txt 2014-05-26 15:31:22.000000000 +0000 @@ -3,11 +3,21 @@ # needed on windows to correctly use the files from dolphinprivate add_definitions(-DLIBDOLPHINPRIVATE_EXPORT=) + +# KItemSetTest +set(kitemsettest_SRCS + kitemsettest.cpp + ../kitemviews/kitemset.cpp +) +kde4_add_unit_test(kitemsettest TEST ${kitemsettest_SRCS}) +target_link_libraries(kitemsettest dolphinprivate ${KDE4_KIO_LIBS} ${QT_QTTEST_LIBRARY}) + # KItemListSelectionManagerTest set(kitemlistselectionmanagertest_SRCS kitemlistselectionmanagertest.cpp ../kitemviews/kitemlistselectionmanager.cpp ../kitemviews/kitemmodelbase.cpp + ../kitemviews/kitemset.cpp ) kde4_add_unit_test(kitemlistselectionmanagertest TEST ${kitemlistselectionmanagertest_SRCS}) target_link_libraries(kitemlistselectionmanagertest dolphinprivate ${KDE4_KIO_LIBS} ${QT_QTTEST_LIBRARY}) @@ -24,6 +34,7 @@ ../kitemviews/kitemlistcontainer.cpp ../kitemviews/kitemlistwidget.cpp ../kitemviews/kitemlistviewaccessible.cpp + ../kitemviews/kitemset.cpp ../kitemviews/kstandarditemlistview.cpp ../kitemviews/kstandarditemlistwidget.cpp ) @@ -41,6 +52,7 @@ ../kitemviews/kitemlistviewaccessible.cpp ../kitemviews/kitemlistcontainer.cpp ../kitemviews/kitemlistwidget.cpp + ../kitemviews/kitemset.cpp ../kitemviews/kstandarditemlistview.cpp ../kitemviews/kstandarditemlistwidget.cpp ) @@ -53,6 +65,7 @@ testdir.cpp ../kitemviews/kfileitemmodel.cpp ../kitemviews/kitemmodelbase.cpp + ../kitemviews/kitemset.cpp ) kde4_add_unit_test(kfileitemmodeltest TEST ${kfileitemmodeltest_SRCS}) target_link_libraries(kfileitemmodeltest dolphinprivate ${KDE4_KIO_LIBS} ${QT_QTTEST_LIBRARY}) @@ -76,19 +89,18 @@ target_link_libraries(kitemlistkeyboardsearchmanagertest ${KDE4_KIO_LIBS} ${QT_QTTEST_LIBRARY}) # DolphinSearchBox -if (Nepomuk_FOUND) +if (Baloo_FOUND) set(dolphinsearchboxtest_SRCS dolphinsearchboxtest.cpp ../search/dolphinfacetswidget.cpp ../search/dolphinsearchbox.cpp - ../search/dolphinsearchinformation.cpp ) kde4_add_kcfg_files(dolphinsearchboxtest_SRCS ../search/dolphin_searchsettings.kcfgc ) kde4_add_unit_test(dolphinsearchboxtest TEST ${dolphinsearchboxtest_SRCS}) - target_link_libraries(dolphinsearchboxtest ${KDE4_KIO_LIBS} ${SOPRANO_LIBRARIES} ${NEPOMUK_CORE_LIBRARY} nepomukutils ${QT_QTTEST_LIBRARY}) -endif (Nepomuk_FOUND) + target_link_libraries(dolphinsearchboxtest ${KDE4_KIO_LIBS} ${BALOO_LIBRARIES} ${QT_QTTEST_LIBRARY}) +endif (Baloo_FOUND) # KStandardItemModelTest set(kstandarditemmodeltest_SRCS diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/tests/kfileitemmodelbenchmark.cpp netrunner-desktop-containment-4.13.0/dolphin/src/tests/kfileitemmodelbenchmark.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/tests/kfileitemmodelbenchmark.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/tests/kfileitemmodelbenchmark.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -185,7 +185,7 @@ QCOMPARE(model.count(), initialItems.count() + newItems.count()); if (!removedItems.isEmpty()) { - model.removeItems(removedItems, KFileItemModel::DeleteItemData); + model.slotItemsDeleted(removedItems); } QCOMPARE(model.count(), initialItems.count() + newItems.count() - removedItems.count()); } diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/tests/kfileitemmodeltest.cpp netrunner-desktop-containment-4.13.0/dolphin/src/tests/kfileitemmodeltest.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/tests/kfileitemmodeltest.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/tests/kfileitemmodeltest.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -49,6 +49,7 @@ const int DefaultTimeout = 5000; }; +Q_DECLARE_METATYPE(KItemRange) Q_DECLARE_METATYPE(KItemRangeList) Q_DECLARE_METATYPE(QList) @@ -76,6 +77,7 @@ void testExpandItems(); void testExpandParentItems(); void testMakeExpandedItemHidden(); + void testRemoveFilteredExpandedItems(); void testSorting(); void testIndexForKeyboardSearch(); void testNameFilter(); @@ -86,6 +88,13 @@ void removeParentOfHiddenItems(); void testGeneralParentChildRelationships(); void testNameRoleGroups(); + void testNameRoleGroupsWithExpandedItems(); + void testInconsistentModel(); + void testChangeRolesForFilteredItems(); + void testChangeSortRoleWhileFiltering(); + void testRefreshFilteredItems(); + void testCollapseFolderWhileLoading(); + void testCreateMimeData(); private: QStringList itemsInModel() const; @@ -497,7 +506,8 @@ // KFileItemModel::expansionLevelsCompare(const KFileItem& a, const KFileItem& b) // yields the correct result for "a/a/1" and "a/a-1/", whis is non-trivial because they share the // first three characters. - QSet modelRoles = m_model->roles(); + QSet originalModelRoles = m_model->roles(); + QSet modelRoles = originalModelRoles; modelRoles << "isExpanded" << "isExpandable" << "expandedParentsCount"; m_model->setRoles(modelRoles); @@ -604,6 +614,18 @@ QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(directoryLoadingCompleted()), DefaultTimeout)); QCOMPARE(m_model->count(), 5); // 5 items: "a/", "a/a/", "a/a/1", "a/a-1/", "a/a-1/1" QCOMPARE(m_model->expandedDirectories(), allFolders); + + // Remove all expanded items by changing the roles + spyRemoved.clear(); + m_model->setRoles(originalModelRoles); + QVERIFY(!m_model->isExpanded(0)); + QCOMPARE(m_model->count(), 1); + QVERIFY(!m_model->expandedDirectories().contains(KUrl(m_testDir->name() + 'a'))); + + QCOMPARE(spyRemoved.count(), 1); + itemRangeList = spyRemoved.takeFirst().at(0).value(); + QCOMPARE(itemRangeList, KItemRangeList() << KItemRange(1, 4)); // 4 items removed + QVERIFY(m_model->isConsistent()); } void KFileItemModelTest::testExpandParentItems() @@ -656,6 +678,28 @@ QVERIFY(m_model->isExpanded(3)); QVERIFY(!m_model->isExpanded(4)); QVERIFY(m_model->isConsistent()); + + // Expand "a 1/b1/". + m_model->setExpanded(1, true); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(directoryLoadingCompleted()), DefaultTimeout)); + QCOMPARE(m_model->count(), 6); + QVERIFY(m_model->isExpanded(0)); + QVERIFY(m_model->isExpanded(1)); + QVERIFY(!m_model->isExpanded(2)); + QVERIFY(m_model->isExpanded(3)); + QVERIFY(m_model->isExpanded(4)); + QVERIFY(!m_model->isExpanded(5)); + QVERIFY(m_model->isConsistent()); + + // Collapse "a 1/b1/" again, and verify that the previous state is restored. + m_model->setExpanded(1, false); + QCOMPARE(m_model->count(), 5); + QVERIFY(m_model->isExpanded(0)); + QVERIFY(!m_model->isExpanded(1)); + QVERIFY(m_model->isExpanded(2)); + QVERIFY(m_model->isExpanded(3)); + QVERIFY(!m_model->isExpanded(4)); + QVERIFY(m_model->isConsistent()); } /** @@ -707,6 +751,51 @@ } +void KFileItemModelTest::testRemoveFilteredExpandedItems() +{ + QSet originalModelRoles = m_model->roles(); + QSet modelRoles = originalModelRoles; + modelRoles << "isExpanded" << "isExpandable" << "expandedParentsCount"; + m_model->setRoles(modelRoles); + + QStringList files; + files << "folder/child" << "file"; // missing folders are created automatically + m_testDir->createFiles(files); + + m_model->loadDirectory(m_testDir->url()); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout)); + + // So far, the model contains only "folder/" and "file". + QCOMPARE(m_model->count(), 2); + QVERIFY(m_model->isExpandable(0)); + QVERIFY(!m_model->isExpandable(1)); + QVERIFY(!m_model->isExpanded(0)); + QVERIFY(!m_model->isExpanded(1)); + QCOMPARE(itemsInModel(), QStringList() << "folder" << "file"); + + // Expand "folder" -> "folder/child" becomes visible. + m_model->setExpanded(0, true); + QVERIFY(m_model->isExpanded(0)); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout)); + QCOMPARE(itemsInModel(), QStringList() << "folder" << "child" << "file"); + + // Add a name filter. + m_model->setNameFilter("f"); + QCOMPARE(itemsInModel(), QStringList() << "folder" << "file"); + + m_model->setNameFilter("fo"); + QCOMPARE(itemsInModel(), QStringList() << "folder"); + + // Remove all expanded items by changing the roles + m_model->setRoles(originalModelRoles); + QVERIFY(!m_model->isExpanded(0)); + QCOMPARE(itemsInModel(), QStringList() << "folder"); + + // Remove the name filter and verify that "folder/child" does not reappear. + m_model->setNameFilter(QString()); + QCOMPARE(itemsInModel(), QStringList() << "folder" << "file"); +} + void KFileItemModelTest::testSorting() { // Create some files with different sizes and modification times to check the different sorting options @@ -756,7 +845,8 @@ QCOMPARE(m_model->sortOrder(), Qt::AscendingOrder); QCOMPARE(itemsInModel(), QStringList() << "a" << "b" << "c" << "c-1" << "c-2" << "c-3" << "d" << "e"); QCOMPARE(spyItemsMoved.count(), 1); - QCOMPARE(spyItemsMoved.takeFirst().at(1).value >(), QList() << 2 << 4 << 5 << 3 << 0 << 1 << 6 << 7); + QCOMPARE(spyItemsMoved.first().at(0).value(), KItemRange(0, 6)); + QCOMPARE(spyItemsMoved.takeFirst().at(1).value >(), QList() << 2 << 4 << 5 << 3 << 0 << 1); // Sort by Name, descending m_model->setSortDirectoriesFirst(true); @@ -765,8 +855,10 @@ QCOMPARE(m_model->sortOrder(), Qt::DescendingOrder); QCOMPARE(itemsInModel(), QStringList() << "c" << "c-2" << "c-3" << "c-1" << "e" << "d" << "b" << "a"); QCOMPARE(spyItemsMoved.count(), 2); - QCOMPARE(spyItemsMoved.takeFirst().at(1).value >(), QList() << 4 << 5 << 0 << 3 << 1 << 2 << 6 << 7); - QCOMPARE(spyItemsMoved.takeFirst().at(1).value >(), QList() << 0 << 1 << 2 << 3 << 7 << 6 << 5 << 4); + QCOMPARE(spyItemsMoved.first().at(0).value(), KItemRange(0, 6)); + QCOMPARE(spyItemsMoved.takeFirst().at(1).value >(), QList() << 4 << 5 << 0 << 3 << 1 << 2); + QCOMPARE(spyItemsMoved.first().at(0).value(), KItemRange(4, 4)); + QCOMPARE(spyItemsMoved.takeFirst().at(1).value >(), QList() << 7 << 6 << 5 << 4); // Sort by Date, descending m_model->setSortDirectoriesFirst(true); @@ -775,7 +867,8 @@ QCOMPARE(m_model->sortOrder(), Qt::DescendingOrder); QCOMPARE(itemsInModel(), QStringList() << "c" << "c-2" << "c-3" << "c-1" << "b" << "d" << "a" << "e"); QCOMPARE(spyItemsMoved.count(), 1); - QCOMPARE(spyItemsMoved.takeFirst().at(1).value >(), QList() << 0 << 1 << 2 << 3 << 7 << 5 << 4 << 6); + QCOMPARE(spyItemsMoved.first().at(0).value(), KItemRange(4, 4)); + QCOMPARE(spyItemsMoved.takeFirst().at(1).value >(), QList() << 7 << 5 << 4 << 6); // Sort by Date, ascending m_model->setSortOrder(Qt::AscendingOrder); @@ -783,7 +876,8 @@ QCOMPARE(m_model->sortOrder(), Qt::AscendingOrder); QCOMPARE(itemsInModel(), QStringList() << "c" << "c-2" << "c-3" << "c-1" << "e" << "a" << "d" << "b"); QCOMPARE(spyItemsMoved.count(), 1); - QCOMPARE(spyItemsMoved.takeFirst().at(1).value >(), QList() << 0 << 1 << 2 << 3 << 7 << 6 << 5 << 4); + QCOMPARE(spyItemsMoved.first().at(0).value(), KItemRange(4, 4)); + QCOMPARE(spyItemsMoved.takeFirst().at(1).value >(), QList() << 7 << 6 << 5 << 4); // Sort by Date, ascending, 'Sort Folders First' disabled m_model->setSortDirectoriesFirst(false); @@ -792,7 +886,8 @@ QVERIFY(!m_model->sortDirectoriesFirst()); QCOMPARE(itemsInModel(), QStringList() << "e" << "a" << "c" << "c-1" << "c-2" << "c-3" << "d" << "b"); QCOMPARE(spyItemsMoved.count(), 1); - QCOMPARE(spyItemsMoved.takeFirst().at(1).value >(), QList() << 2 << 4 << 5 << 3 << 0 << 1 << 6 << 7); + QCOMPARE(spyItemsMoved.first().at(0).value(), KItemRange(0, 6)); + QCOMPARE(spyItemsMoved.takeFirst().at(1).value >(), QList() << 2 << 4 << 5 << 3 << 0 << 1); // Sort by Name, ascending, 'Sort Folders First' disabled m_model->setSortRole("text"); @@ -800,6 +895,7 @@ QVERIFY(!m_model->sortDirectoriesFirst()); QCOMPARE(itemsInModel(), QStringList() << "a" << "b" << "c" << "c-1" << "c-2" << "c-3" << "d" << "e"); QCOMPARE(spyItemsMoved.count(), 1); + QCOMPARE(spyItemsMoved.first().at(0).value(), KItemRange(0, 8)); QCOMPARE(spyItemsMoved.takeFirst().at(1).value >(), QList() << 7 << 0 << 2 << 3 << 4 << 5 << 6 << 1); // Sort by Size, ascending, 'Sort Folders First' disabled @@ -809,19 +905,15 @@ QVERIFY(!m_model->sortDirectoriesFirst()); QCOMPARE(itemsInModel(), QStringList() << "c" << "c-2" << "c-3" << "c-1" << "a" << "b" << "e" << "d"); QCOMPARE(spyItemsMoved.count(), 1); + QCOMPARE(spyItemsMoved.first().at(0).value(), KItemRange(0, 8)); QCOMPARE(spyItemsMoved.takeFirst().at(1).value >(), QList() << 4 << 5 << 0 << 3 << 1 << 2 << 7 << 6); - QSKIP("2 tests of testSorting() are temporary deactivated as in KFileItemModel resortAllItems() " - "always emits a itemsMoved() signal. Before adjusting the tests think about probably introducing " - "another signal", SkipSingle); - // Internal note: Check comment in KFileItemModel::resortAllItems() for details. - // In 'Sort by Size' mode, folders are always first -> changing 'Sort Folders First' does not resort the model m_model->setSortDirectoriesFirst(true); QCOMPARE(m_model->sortRole(), QByteArray("size")); QCOMPARE(m_model->sortOrder(), Qt::AscendingOrder); QVERIFY(m_model->sortDirectoriesFirst()); - QCOMPARE(itemsInModel(), QStringList() << "c" << "a" << "b" << "e" << "d"); + QCOMPARE(itemsInModel(), QStringList() << "c" << "c-2" << "c-3" << "c-1" << "a" << "b" << "e" << "d"); QCOMPARE(spyItemsMoved.count(), 0); // Sort by Size, descending, 'Sort Folders First' enabled @@ -829,9 +921,10 @@ QCOMPARE(m_model->sortRole(), QByteArray("size")); QCOMPARE(m_model->sortOrder(), Qt::DescendingOrder); QVERIFY(m_model->sortDirectoriesFirst()); - QCOMPARE(itemsInModel(), QStringList() << "c" << "d" << "e" << "b" << "a"); + QCOMPARE(itemsInModel(), QStringList() << "c" << "c-2" << "c-3" << "c-1" << "d" << "e" << "b" << "a"); QCOMPARE(spyItemsMoved.count(), 1); - QCOMPARE(spyItemsMoved.takeFirst().at(1).value >(), QList() << 0 << 4 << 3 << 2 << 1); + QCOMPARE(spyItemsMoved.first().at(0).value(), KItemRange(4, 4)); + QCOMPARE(spyItemsMoved.takeFirst().at(1).value >(), QList() << 7 << 6 << 5 << 4); // TODO: Sort by other roles; show/hide hidden files } @@ -1249,7 +1342,7 @@ // Rename c.txt to d.txt. data.insert("text", "d.txt"); m_model->setData(2, data); - QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsMoved(KItemRange,QList)), DefaultTimeout)); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(groupsChanged()), DefaultTimeout)); QCOMPARE(itemsInModel(), QStringList() << "a.txt" << "b.txt" << "d.txt" << "e.txt"); expectedGroups.clear(); @@ -1267,7 +1360,7 @@ fileItemC.setUrl(urlC); m_model->slotRefreshItems(QList >() << qMakePair(fileItemD, fileItemC)); - QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsMoved(KItemRange,QList)), DefaultTimeout)); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(groupsChanged()), DefaultTimeout)); QCOMPARE(itemsInModel(), QStringList() << "a.txt" << "b.txt" << "c.txt" << "e.txt"); expectedGroups.clear(); @@ -1278,11 +1371,337 @@ QCOMPARE(m_model->groups(), expectedGroups); } +void KFileItemModelTest::testNameRoleGroupsWithExpandedItems() +{ + QSet modelRoles = m_model->roles(); + modelRoles << "isExpanded" << "isExpandable" << "expandedParentsCount"; + m_model->setRoles(modelRoles); + + QStringList files; + files << "a/b.txt" << "a/c.txt" << "d/e.txt" << "d/f.txt"; + + m_testDir->createFiles(files); + + m_model->setGroupedSorting(true); + m_model->loadDirectory(m_testDir->url()); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout)); + QCOMPARE(itemsInModel(), QStringList() << "a" << "d"); + + QList > expectedGroups; + expectedGroups << QPair(0, QLatin1String("A")); + expectedGroups << QPair(1, QLatin1String("D")); + QCOMPARE(m_model->groups(), expectedGroups); + + // Verify that expanding "a" and "d" will not change the groups (except for the index of "D"). + expectedGroups.clear(); + expectedGroups << QPair(0, QLatin1String("A")); + expectedGroups << QPair(3, QLatin1String("D")); + + m_model->setExpanded(0, true); + QVERIFY(m_model->isExpanded(0)); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout)); + QCOMPARE(itemsInModel(), QStringList() << "a" << "b.txt" << "c.txt" << "d"); + QCOMPARE(m_model->groups(), expectedGroups); + + m_model->setExpanded(3, true); + QVERIFY(m_model->isExpanded(3)); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout)); + QCOMPARE(itemsInModel(), QStringList() << "a" << "b.txt" << "c.txt" << "d" << "e.txt" << "f.txt"); + QCOMPARE(m_model->groups(), expectedGroups); +} + +void KFileItemModelTest::testInconsistentModel() +{ + QSet modelRoles = m_model->roles(); + modelRoles << "isExpanded" << "isExpandable" << "expandedParentsCount"; + m_model->setRoles(modelRoles); + + QStringList files; + files << "a/b/c1.txt" << "a/b/c2.txt"; + + m_testDir->createFiles(files); + + m_model->loadDirectory(m_testDir->url()); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout)); + QCOMPARE(itemsInModel(), QStringList() << "a"); + + // Expand "a/" and "a/b/". + m_model->setExpanded(0, true); + QVERIFY(m_model->isExpanded(0)); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout)); + QCOMPARE(itemsInModel(), QStringList() << "a" << "b"); + + m_model->setExpanded(1, true); + QVERIFY(m_model->isExpanded(1)); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout)); + QCOMPARE(itemsInModel(), QStringList() << "a" << "b" << "c1.txt" << "c2.txt"); + + // Add the files "c1.txt" and "c2.txt" to the model also as top-level items. + // Such a thing can in principle happen when performing a search, and there + // are files which + // (a) match the search string, and + // (b) are children of a folder that matches the search string and is expanded. + // + // Note that the first item in the list of added items must be new (i.e., not + // in the model yet). Otherwise, KFileItemModel::slotItemsAdded() will see that + // it receives items that are in the model already and ignore them. + KUrl url(m_model->directory().url() + "/a2"); + KFileItem newItem(KFileItem::Unknown, KFileItem::Unknown, url); + + KFileItemList items; + items << newItem << m_model->fileItem(2) << m_model->fileItem(3); + m_model->slotItemsAdded(m_model->directory(), items); + m_model->slotCompleted(); + QCOMPARE(itemsInModel(), QStringList() << "a" << "b" << "c1.txt" << "c2.txt" << "a2" << "c1.txt" << "c2.txt"); + + m_model->setExpanded(0, false); + + // Test that the right items have been removed, see + // https://bugs.kde.org/show_bug.cgi?id=324371 + QCOMPARE(itemsInModel(), QStringList() << "a" << "a2" << "c1.txt" << "c2.txt"); + + // Test that resorting does not cause a crash, see + // https://bugs.kde.org/show_bug.cgi?id=325359 + // The crash is not 100% reproducible, but Valgrind will report an invalid memory access. + m_model->resortAllItems(); + +} + +void KFileItemModelTest::testChangeRolesForFilteredItems() +{ + QSet modelRoles = m_model->roles(); + modelRoles << "owner"; + m_model->setRoles(modelRoles); + + QStringList files; + files << "a.txt" << "aa.txt" << "aaa.txt"; + m_testDir->createFiles(files); + + m_model->loadDirectory(m_testDir->url()); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout)); + QCOMPARE(itemsInModel(), QStringList() << "a.txt" << "aa.txt" << "aaa.txt"); + + for (int index = 0; index < m_model->count(); ++index) { + // All items should have the "text" and "owner" roles, but not "group". + QVERIFY(m_model->data(index).contains("text")); + QVERIFY(m_model->data(index).contains("owner")); + QVERIFY(!m_model->data(index).contains("group")); + } + + // Add a filter, such that only "aaa.txt" remains in the model. + m_model->setNameFilter("aaa"); + QCOMPARE(itemsInModel(), QStringList() << "aaa.txt"); + + // Add the "group" role. + modelRoles << "group"; + m_model->setRoles(modelRoles); + + // Modify the filter, such that "aa.txt" reappears, and verify that all items have the expected roles. + m_model->setNameFilter("aa"); + QCOMPARE(itemsInModel(), QStringList() << "aa.txt" << "aaa.txt"); + + for (int index = 0; index < m_model->count(); ++index) { + // All items should have the "text", "owner", and "group" roles. + QVERIFY(m_model->data(index).contains("text")); + QVERIFY(m_model->data(index).contains("owner")); + QVERIFY(m_model->data(index).contains("group")); + } + + // Remove the "owner" role. + modelRoles.remove("owner"); + m_model->setRoles(modelRoles); + + // Clear the filter, and verify that all items have the expected roles + m_model->setNameFilter(QString()); + QCOMPARE(itemsInModel(), QStringList() << "a.txt" << "aa.txt" << "aaa.txt"); + + for (int index = 0; index < m_model->count(); ++index) { + // All items should have the "text" and "group" roles, but now "owner". + QVERIFY(m_model->data(index).contains("text")); + QVERIFY(!m_model->data(index).contains("owner")); + QVERIFY(m_model->data(index).contains("group")); + } +} + +void KFileItemModelTest::testChangeSortRoleWhileFiltering() +{ + KFileItemList items; + + KIO::UDSEntry entry; + entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, 0100000); // S_IFREG might not be defined on non-Unix platforms. + entry.insert(KIO::UDSEntry::UDS_ACCESS, 07777); + entry.insert(KIO::UDSEntry::UDS_SIZE, 0); + entry.insert(KIO::UDSEntry::UDS_MODIFICATION_TIME, 0); + entry.insert(KIO::UDSEntry::UDS_GROUP, "group"); + entry.insert(KIO::UDSEntry::UDS_ACCESS_TIME, 0); + + entry.insert(KIO::UDSEntry::UDS_NAME, "a.txt"); + entry.insert(KIO::UDSEntry::UDS_USER, "user-b"); + items.append(KFileItem(entry, m_testDir->url(), false, true)); + + entry.insert(KIO::UDSEntry::UDS_NAME, "b.txt"); + entry.insert(KIO::UDSEntry::UDS_USER, "user-c"); + items.append(KFileItem(entry, m_testDir->url(), false, true)); + + entry.insert(KIO::UDSEntry::UDS_NAME, "c.txt"); + entry.insert(KIO::UDSEntry::UDS_USER, "user-a"); + items.append(KFileItem(entry, m_testDir->url(), false, true)); + + m_model->slotItemsAdded(m_testDir->url(), items); + m_model->slotCompleted(); + + QCOMPARE(itemsInModel(), QStringList() << "a.txt" << "b.txt" << "c.txt"); + + // Add a filter. + m_model->setNameFilter("a"); + QCOMPARE(itemsInModel(), QStringList() << "a.txt"); + + // Sort by "owner". + m_model->setSortRole("owner"); + + // Clear the filter, and verify that the items are sorted correctly. + m_model->setNameFilter(QString()); + QCOMPARE(itemsInModel(), QStringList() << "c.txt" << "a.txt" << "b.txt"); +} + +void KFileItemModelTest::testRefreshFilteredItems() +{ + QStringList files; + files << "a.txt" << "b.txt" << "c.jpg" << "d.jpg"; + m_testDir->createFiles(files); + + m_model->loadDirectory(m_testDir->url()); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout)); + QCOMPARE(itemsInModel(), QStringList() << "a.txt" << "b.txt" << "c.jpg" << "d.jpg"); + + const KFileItem fileItemC = m_model->fileItem(2); + + // Show only the .txt files. + m_model->setNameFilter(".txt"); + QCOMPARE(itemsInModel(), QStringList() << "a.txt" << "b.txt"); + + // Rename one of the .jpg files. + KFileItem fileItemE = fileItemC; + KUrl urlE = fileItemE.url(); + urlE.setFileName("e.jpg"); + fileItemE.setUrl(urlE); + + m_model->slotRefreshItems(QList >() << qMakePair(fileItemC, fileItemE)); + + // Show all files again, and verify that the model has updated the file name. + m_model->setNameFilter(QString()); + QCOMPARE(itemsInModel(), QStringList() << "a.txt" << "b.txt" << "d.jpg" << "e.jpg"); +} + +void KFileItemModelTest::testCreateMimeData() +{ + QSet modelRoles = m_model->roles(); + modelRoles << "isExpanded" << "isExpandable" << "expandedParentsCount"; + m_model->setRoles(modelRoles); + + QStringList files; + files << "a/1"; + m_testDir->createFiles(files); + + m_model->loadDirectory(m_testDir->url()); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout)); + QCOMPARE(itemsInModel(), QStringList() << "a"); + + // Expand "a/". + m_model->setExpanded(0, true); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout)); + QCOMPARE(itemsInModel(), QStringList() << "a" << "1"); + + // Verify that creating the MIME data for a child of an expanded folder does + // not cause a crash, see https://bugs.kde.org/show_bug.cgi?id=329119 + KItemSet selection; + selection.insert(1); + QMimeData* mimeData = m_model->createMimeData(selection); + delete mimeData; +} + +void KFileItemModelTest::testCollapseFolderWhileLoading() +{ + QSet modelRoles = m_model->roles(); + modelRoles << "isExpanded" << "isExpandable" << "expandedParentsCount"; + m_model->setRoles(modelRoles); + + QStringList files; + files << "a2/b/c1.txt"; + m_testDir->createFiles(files); + + m_model->loadDirectory(m_testDir->url()); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout)); + QCOMPARE(itemsInModel(), QStringList() << "a2"); + + // Expand "a2/". + m_model->setExpanded(0, true); + QVERIFY(m_model->isExpanded(0)); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout)); + QCOMPARE(itemsInModel(), QStringList() << "a2" << "b"); + + // Expand "a2/b/". + m_model->setExpanded(1, true); + QVERIFY(m_model->isExpanded(1)); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout)); + QCOMPARE(itemsInModel(), QStringList() << "a2" << "b" << "c1.txt"); + + // Simulate that a new item "c2.txt" appears, but that the dir lister's completed() + // signal is not emitted yet. + const KFileItem fileItemC1 = m_model->fileItem(2); + KFileItem fileItemC2 = fileItemC1; + KUrl urlC2 = fileItemC2.url(); + urlC2.setFileName("c2.txt"); + fileItemC2.setUrl(urlC2); + + const KUrl urlB = m_model->fileItem(1).url(); + m_model->slotItemsAdded(urlB, KFileItemList() << fileItemC2); + QCOMPARE(itemsInModel(), QStringList() << "a2" << "b" << "c1.txt"); + + // Collapse "a2/". This should also remove all its (indirect) children from + // the model and from the model's m_pendingItemsToInsert member. + m_model->setExpanded(0, false); + QCOMPARE(itemsInModel(), QStringList() << "a2"); + + // Simulate that the dir lister's completed() signal is emitted. If "c2.txt" + // is still in m_pendingItemsToInsert, then we might get a crash, see + // https://bugs.kde.org/show_bug.cgi?id=332102. Even if the crash is not + // reproducible here, Valgrind will complain, and the item "c2.txt" will appear + // without parent in the model. + m_model->slotCompleted(); + QCOMPARE(itemsInModel(), QStringList() << "a2"); + + // Expand "a2/" again. + m_model->setExpanded(0, true); + QVERIFY(m_model->isExpanded(0)); + QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout)); + QCOMPARE(itemsInModel(), QStringList() << "a2" << "b"); + + // Now simulate that a new folder "a1/" is appears, but that the dir lister's + // completed() signal is not emitted yet. + const KFileItem fileItemA2 = m_model->fileItem(0); + KFileItem fileItemA1 = fileItemA2; + KUrl urlA1 = fileItemA1.url(); + urlA1.setFileName("a1"); + fileItemA1.setUrl(urlA1); + + m_model->slotItemsAdded(m_model->directory(), KFileItemList() << fileItemA1); + QCOMPARE(itemsInModel(), QStringList() << "a2" << "b"); + + // Collapse "a2/". Note that this will cause "a1/" to be added to the model, + // i.e., the index of "a2/" will change from 0 to 1. Check that this does not + // confuse the code which collapses the folder. + m_model->setExpanded(0, false); + QCOMPARE(itemsInModel(), QStringList() << "a1" << "a2"); + QVERIFY(!m_model->isExpanded(0)); + QVERIFY(!m_model->isExpanded(1)); +} + QStringList KFileItemModelTest::itemsInModel() const { QStringList items; for (int i = 0; i < m_model->count(); i++) { - items << m_model->data(i).value("text").toString(); + items << m_model->fileItem(i).text(); } return items; } diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/tests/kitemlistcontrollertest.cpp netrunner-desktop-containment-4.13.0/dolphin/src/tests/kitemlistcontrollertest.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/tests/kitemlistcontrollertest.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/tests/kitemlistcontrollertest.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -41,7 +41,7 @@ Q_DECLARE_METATYPE(KFileItemListView::ItemLayout); Q_DECLARE_METATYPE(Qt::Orientation); Q_DECLARE_METATYPE(KItemListController::SelectionBehavior); -Q_DECLARE_METATYPE(QSet); +Q_DECLARE_METATYPE(KItemSet); class KItemListControllerTest : public QObject { @@ -81,7 +81,7 @@ */ void KItemListControllerTest::initTestCase() { - qRegisterMetaType >("QSet"); + qRegisterMetaType("KItemSet"); m_testDir = new TestDir(); m_model = new KFileItemModel(); @@ -98,7 +98,7 @@ << "b1" << "c1" << "c2" << "c3" << "c4" << "c5" << "d1" << "d2" << "d3" << "d4" - << "e1" << "e2" << "e3" << "e4" << "e5" << "e6" << "e7"; + << "e" << "e 2" << "e 3" << "e 4" << "e 5" << "e 6" << "e 7"; m_testDir->createFiles(files); m_model->loadDirectory(m_testDir->url()); @@ -159,14 +159,14 @@ */ struct ViewState { - ViewState(int current, const QSet selection, bool activated = false) : + ViewState(int current, const KItemSet selection, bool activated = false) : m_current(current), m_selection(selection), m_activated(activated) {} int m_current; - QSet m_selection; + KItemSet m_selection; bool m_activated; }; @@ -262,27 +262,34 @@ // First, key presses which should have the same effect // for any layout and any number of columns. testList - << qMakePair(KeyPress(nextItemKey), ViewState(1, QSet() << 1)) - << qMakePair(KeyPress(Qt::Key_Return), ViewState(1, QSet() << 1, true)) - << qMakePair(KeyPress(Qt::Key_Enter), ViewState(1, QSet() << 1, true)) - << qMakePair(KeyPress(nextItemKey), ViewState(2, QSet() << 2)) - << qMakePair(KeyPress(nextItemKey, Qt::ShiftModifier), ViewState(3, QSet() << 2 << 3)) - << qMakePair(KeyPress(Qt::Key_Return), ViewState(3, QSet() << 2 << 3, true)) - << qMakePair(KeyPress(previousItemKey, Qt::ShiftModifier), ViewState(2, QSet() << 2)) - << qMakePair(KeyPress(nextItemKey, Qt::ShiftModifier), ViewState(3, QSet() << 2 << 3)) - << qMakePair(KeyPress(nextItemKey, Qt::ControlModifier), ViewState(4, QSet() << 2 << 3)) - << qMakePair(KeyPress(Qt::Key_Return), ViewState(4, QSet() << 2 << 3, true)) - << qMakePair(KeyPress(previousItemKey), ViewState(3, QSet() << 3)) - << qMakePair(KeyPress(Qt::Key_Home, Qt::ShiftModifier), ViewState(0, QSet() << 0 << 1 << 2 << 3)) - << qMakePair(KeyPress(nextItemKey, Qt::ControlModifier), ViewState(1, QSet() << 0 << 1 << 2 << 3)) - << qMakePair(KeyPress(Qt::Key_Space, Qt::ControlModifier), ViewState(1, QSet() << 0 << 2 << 3)) - << qMakePair(KeyPress(Qt::Key_Space, Qt::ControlModifier), ViewState(1, QSet() << 0 << 1 << 2 << 3)) - << qMakePair(KeyPress(Qt::Key_End), ViewState(19, QSet() << 19)) - << qMakePair(KeyPress(previousItemKey, Qt::ShiftModifier), ViewState(18, QSet() << 18 << 19)) - << qMakePair(KeyPress(Qt::Key_Home), ViewState(0, QSet() << 0)) - << qMakePair(KeyPress(Qt::Key_Space, Qt::ControlModifier), ViewState(0, QSet())) - << qMakePair(KeyPress(Qt::Key_Enter), ViewState(0, QSet(), true)) - << qMakePair(KeyPress(Qt::Key_Space, Qt::ControlModifier), ViewState(0, QSet() << 0)); + << qMakePair(KeyPress(nextItemKey), ViewState(1, KItemSet() << 1)) + << qMakePair(KeyPress(Qt::Key_Return), ViewState(1, KItemSet() << 1, true)) + << qMakePair(KeyPress(Qt::Key_Enter), ViewState(1, KItemSet() << 1, true)) + << qMakePair(KeyPress(nextItemKey), ViewState(2, KItemSet() << 2)) + << qMakePair(KeyPress(nextItemKey, Qt::ShiftModifier), ViewState(3, KItemSet() << 2 << 3)) + << qMakePair(KeyPress(Qt::Key_Return), ViewState(3, KItemSet() << 2 << 3, true)) + << qMakePair(KeyPress(previousItemKey, Qt::ShiftModifier), ViewState(2, KItemSet() << 2)) + << qMakePair(KeyPress(nextItemKey, Qt::ShiftModifier), ViewState(3, KItemSet() << 2 << 3)) + << qMakePair(KeyPress(nextItemKey, Qt::ControlModifier), ViewState(4, KItemSet() << 2 << 3)) + << qMakePair(KeyPress(Qt::Key_Return), ViewState(4, KItemSet() << 2 << 3, true)) + << qMakePair(KeyPress(previousItemKey), ViewState(3, KItemSet() << 3)) + << qMakePair(KeyPress(Qt::Key_Home, Qt::ShiftModifier), ViewState(0, KItemSet() << 0 << 1 << 2 << 3)) + << qMakePair(KeyPress(nextItemKey, Qt::ControlModifier), ViewState(1, KItemSet() << 0 << 1 << 2 << 3)) + << qMakePair(KeyPress(Qt::Key_Space, Qt::ControlModifier), ViewState(1, KItemSet() << 0 << 2 << 3)) + << qMakePair(KeyPress(Qt::Key_Space, Qt::ControlModifier), ViewState(1, KItemSet() << 0 << 1 << 2 << 3)) + << qMakePair(KeyPress(Qt::Key_End), ViewState(19, KItemSet() << 19)) + << qMakePair(KeyPress(previousItemKey, Qt::ShiftModifier), ViewState(18, KItemSet() << 18 << 19)) + << qMakePair(KeyPress(Qt::Key_Home), ViewState(0, KItemSet() << 0)) + << qMakePair(KeyPress(Qt::Key_Space, Qt::ControlModifier), ViewState(0, KItemSet())) + << qMakePair(KeyPress(Qt::Key_Enter), ViewState(0, KItemSet(), true)) + << qMakePair(KeyPress(Qt::Key_Space, Qt::ControlModifier), ViewState(0, KItemSet() << 0)) + << qMakePair(KeyPress(Qt::Key_Space, Qt::ControlModifier), ViewState(0, KItemSet())) + << qMakePair(KeyPress(Qt::Key_Space), ViewState(0, KItemSet() << 0)) + << qMakePair(KeyPress(Qt::Key_E), ViewState(13, KItemSet() << 13)) + << qMakePair(KeyPress(Qt::Key_Space), ViewState(14, KItemSet() << 14)) + << qMakePair(KeyPress(Qt::Key_3), ViewState(15, KItemSet() << 15)) + << qMakePair(KeyPress(Qt::Key_Home), ViewState(0, KItemSet() << 0)) + << qMakePair(KeyPress(Qt::Key_Escape), ViewState(0, KItemSet())); // Next, we test combinations of key presses which only work for a // particular number of columns and either enabled or disabled grouping. @@ -290,12 +297,12 @@ // One column. if (columnCount == 1) { testList - << qMakePair(KeyPress(nextRowKey), ViewState(1, QSet() << 1)) - << qMakePair(KeyPress(nextRowKey, Qt::ShiftModifier), ViewState(2, QSet() << 1 << 2)) - << qMakePair(KeyPress(nextRowKey, Qt::ControlModifier), ViewState(3, QSet() << 1 << 2)) - << qMakePair(KeyPress(previousRowKey), ViewState(2, QSet() << 2)) - << qMakePair(KeyPress(previousItemKey), ViewState(1, QSet() << 1)) - << qMakePair(KeyPress(Qt::Key_Home), ViewState(0, QSet() << 0)); + << qMakePair(KeyPress(nextRowKey), ViewState(1, KItemSet() << 1)) + << qMakePair(KeyPress(nextRowKey, Qt::ShiftModifier), ViewState(2, KItemSet() << 1 << 2)) + << qMakePair(KeyPress(nextRowKey, Qt::ControlModifier), ViewState(3, KItemSet() << 1 << 2)) + << qMakePair(KeyPress(previousRowKey), ViewState(2, KItemSet() << 2)) + << qMakePair(KeyPress(previousItemKey), ViewState(1, KItemSet() << 1)) + << qMakePair(KeyPress(Qt::Key_Home), ViewState(0, KItemSet() << 0)); } // Multiple columns: we test both 3 and 5 columns with grouping @@ -314,26 +321,26 @@ // e3 e4 e5 | 15 16 17 // e6 e7 | 18 19 testList - << qMakePair(KeyPress(nextRowKey), ViewState(3, QSet() << 3)) - << qMakePair(KeyPress(nextItemKey, Qt::ControlModifier), ViewState(4, QSet() << 3)) - << qMakePair(KeyPress(nextRowKey), ViewState(7, QSet() << 7)) - << qMakePair(KeyPress(nextItemKey, Qt::ShiftModifier), ViewState(8, QSet() << 7 << 8)) - << qMakePair(KeyPress(nextItemKey, Qt::ShiftModifier), ViewState(9, QSet() << 7 << 8 << 9)) - << qMakePair(KeyPress(previousItemKey, Qt::ShiftModifier), ViewState(8, QSet() << 7 << 8)) - << qMakePair(KeyPress(previousItemKey, Qt::ShiftModifier), ViewState(7, QSet() << 7)) - << qMakePair(KeyPress(previousItemKey, Qt::ShiftModifier), ViewState(6, QSet() << 6 << 7)) - << qMakePair(KeyPress(previousItemKey, Qt::ShiftModifier), ViewState(5, QSet() << 5 << 6 << 7)) - << qMakePair(KeyPress(nextItemKey, Qt::ShiftModifier), ViewState(6, QSet() << 6 << 7)) - << qMakePair(KeyPress(nextItemKey, Qt::ShiftModifier), ViewState(7, QSet() << 7)) - << qMakePair(KeyPress(nextRowKey), ViewState(10, QSet() << 10)) - << qMakePair(KeyPress(nextItemKey), ViewState(11, QSet() << 11)) - << qMakePair(KeyPress(nextRowKey), ViewState(14, QSet() << 14)) - << qMakePair(KeyPress(nextRowKey), ViewState(17, QSet() << 17)) - << qMakePair(KeyPress(nextRowKey), ViewState(19, QSet() << 19)) - << qMakePair(KeyPress(previousRowKey), ViewState(17, QSet() << 17)) - << qMakePair(KeyPress(Qt::Key_End), ViewState(19, QSet() << 19)) - << qMakePair(KeyPress(previousRowKey), ViewState(16, QSet() << 16)) - << qMakePair(KeyPress(Qt::Key_Home), ViewState(0, QSet() << 0)); + << qMakePair(KeyPress(nextRowKey), ViewState(3, KItemSet() << 3)) + << qMakePair(KeyPress(nextItemKey, Qt::ControlModifier), ViewState(4, KItemSet() << 3)) + << qMakePair(KeyPress(nextRowKey), ViewState(7, KItemSet() << 7)) + << qMakePair(KeyPress(nextItemKey, Qt::ShiftModifier), ViewState(8, KItemSet() << 7 << 8)) + << qMakePair(KeyPress(nextItemKey, Qt::ShiftModifier), ViewState(9, KItemSet() << 7 << 8 << 9)) + << qMakePair(KeyPress(previousItemKey, Qt::ShiftModifier), ViewState(8, KItemSet() << 7 << 8)) + << qMakePair(KeyPress(previousItemKey, Qt::ShiftModifier), ViewState(7, KItemSet() << 7)) + << qMakePair(KeyPress(previousItemKey, Qt::ShiftModifier), ViewState(6, KItemSet() << 6 << 7)) + << qMakePair(KeyPress(previousItemKey, Qt::ShiftModifier), ViewState(5, KItemSet() << 5 << 6 << 7)) + << qMakePair(KeyPress(nextItemKey, Qt::ShiftModifier), ViewState(6, KItemSet() << 6 << 7)) + << qMakePair(KeyPress(nextItemKey, Qt::ShiftModifier), ViewState(7, KItemSet() << 7)) + << qMakePair(KeyPress(nextRowKey), ViewState(10, KItemSet() << 10)) + << qMakePair(KeyPress(nextItemKey), ViewState(11, KItemSet() << 11)) + << qMakePair(KeyPress(nextRowKey), ViewState(14, KItemSet() << 14)) + << qMakePair(KeyPress(nextRowKey), ViewState(17, KItemSet() << 17)) + << qMakePair(KeyPress(nextRowKey), ViewState(19, KItemSet() << 19)) + << qMakePair(KeyPress(previousRowKey), ViewState(17, KItemSet() << 17)) + << qMakePair(KeyPress(Qt::Key_End), ViewState(19, KItemSet() << 19)) + << qMakePair(KeyPress(previousRowKey), ViewState(16, KItemSet() << 16)) + << qMakePair(KeyPress(Qt::Key_Home), ViewState(0, KItemSet() << 0)); } if (columnCount == 5 && !groupingEnabled) { @@ -344,17 +351,17 @@ // d2 d3 d4 e1 e2 | 10 11 12 13 14 // e3 e4 e5 e6 e7 | 15 16 17 18 19 testList - << qMakePair(KeyPress(nextRowKey), ViewState(5, QSet() << 5)) - << qMakePair(KeyPress(nextItemKey, Qt::ControlModifier), ViewState(6, QSet() << 5)) - << qMakePair(KeyPress(nextRowKey), ViewState(11, QSet() << 11)) - << qMakePair(KeyPress(nextItemKey), ViewState(12, QSet() << 12)) - << qMakePair(KeyPress(nextRowKey, Qt::ShiftModifier), ViewState(17, QSet() << 12 << 13 << 14 << 15 << 16 << 17)) - << qMakePair(KeyPress(previousRowKey, Qt::ShiftModifier), ViewState(12, QSet() << 12)) - << qMakePair(KeyPress(previousRowKey, Qt::ShiftModifier), ViewState(7, QSet() << 7 << 8 << 9 << 10 << 11 << 12)) - << qMakePair(KeyPress(nextRowKey, Qt::ShiftModifier), ViewState(12, QSet() << 12)) - << qMakePair(KeyPress(Qt::Key_End, Qt::ControlModifier), ViewState(19, QSet() << 12)) - << qMakePair(KeyPress(previousRowKey), ViewState(14, QSet() << 14)) - << qMakePair(KeyPress(Qt::Key_Home), ViewState(0, QSet() << 0)); + << qMakePair(KeyPress(nextRowKey), ViewState(5, KItemSet() << 5)) + << qMakePair(KeyPress(nextItemKey, Qt::ControlModifier), ViewState(6, KItemSet() << 5)) + << qMakePair(KeyPress(nextRowKey), ViewState(11, KItemSet() << 11)) + << qMakePair(KeyPress(nextItemKey), ViewState(12, KItemSet() << 12)) + << qMakePair(KeyPress(nextRowKey, Qt::ShiftModifier), ViewState(17, KItemSet() << 12 << 13 << 14 << 15 << 16 << 17)) + << qMakePair(KeyPress(previousRowKey, Qt::ShiftModifier), ViewState(12, KItemSet() << 12)) + << qMakePair(KeyPress(previousRowKey, Qt::ShiftModifier), ViewState(7, KItemSet() << 7 << 8 << 9 << 10 << 11 << 12)) + << qMakePair(KeyPress(nextRowKey, Qt::ShiftModifier), ViewState(12, KItemSet() << 12)) + << qMakePair(KeyPress(Qt::Key_End, Qt::ControlModifier), ViewState(19, KItemSet() << 12)) + << qMakePair(KeyPress(previousRowKey), ViewState(14, KItemSet() << 14)) + << qMakePair(KeyPress(Qt::Key_Home), ViewState(0, KItemSet() << 0)); } if (columnCount == 3 && groupingEnabled) { @@ -370,19 +377,19 @@ // e4 e5 e6 | 16 17 18 // e7 | 19 testList - << qMakePair(KeyPress(nextItemKey), ViewState(1, QSet() << 1)) - << qMakePair(KeyPress(nextItemKey), ViewState(2, QSet() << 2)) - << qMakePair(KeyPress(nextRowKey, Qt::ShiftModifier), ViewState(3, QSet() << 2 << 3)) - << qMakePair(KeyPress(nextRowKey, Qt::ShiftModifier), ViewState(6, QSet() << 2 << 3 << 4 << 5 << 6)) - << qMakePair(KeyPress(nextRowKey), ViewState(8, QSet() << 8)) - << qMakePair(KeyPress(nextRowKey), ViewState(11, QSet() << 11)) - << qMakePair(KeyPress(nextItemKey, Qt::ControlModifier), ViewState(12, QSet() << 11)) - << qMakePair(KeyPress(nextRowKey), ViewState(13, QSet() << 13)) - << qMakePair(KeyPress(nextRowKey), ViewState(16, QSet() << 16)) - << qMakePair(KeyPress(nextItemKey), ViewState(17, QSet() << 17)) - << qMakePair(KeyPress(nextRowKey), ViewState(19, QSet() << 19)) - << qMakePair(KeyPress(previousRowKey), ViewState(17, QSet() << 17)) - << qMakePair(KeyPress(Qt::Key_Home), ViewState(0, QSet() << 0)); + << qMakePair(KeyPress(nextItemKey), ViewState(1, KItemSet() << 1)) + << qMakePair(KeyPress(nextItemKey), ViewState(2, KItemSet() << 2)) + << qMakePair(KeyPress(nextRowKey, Qt::ShiftModifier), ViewState(3, KItemSet() << 2 << 3)) + << qMakePair(KeyPress(nextRowKey, Qt::ShiftModifier), ViewState(6, KItemSet() << 2 << 3 << 4 << 5 << 6)) + << qMakePair(KeyPress(nextRowKey), ViewState(8, KItemSet() << 8)) + << qMakePair(KeyPress(nextRowKey), ViewState(11, KItemSet() << 11)) + << qMakePair(KeyPress(nextItemKey, Qt::ControlModifier), ViewState(12, KItemSet() << 11)) + << qMakePair(KeyPress(nextRowKey), ViewState(13, KItemSet() << 13)) + << qMakePair(KeyPress(nextRowKey), ViewState(16, KItemSet() << 16)) + << qMakePair(KeyPress(nextItemKey), ViewState(17, KItemSet() << 17)) + << qMakePair(KeyPress(nextRowKey), ViewState(19, KItemSet() << 19)) + << qMakePair(KeyPress(previousRowKey), ViewState(17, KItemSet() << 17)) + << qMakePair(KeyPress(Qt::Key_Home), ViewState(0, KItemSet() << 0)); } if (columnCount == 5 && groupingEnabled) { @@ -395,19 +402,19 @@ // e1 e2 e3 e4 e5 | 13 14 15 16 17 // e6 e7 | 18 19 testList - << qMakePair(KeyPress(nextItemKey), ViewState(1, QSet() << 1)) - << qMakePair(KeyPress(nextRowKey, Qt::ShiftModifier), ViewState(3, QSet() << 1 << 2 << 3)) - << qMakePair(KeyPress(nextRowKey, Qt::ShiftModifier), ViewState(5, QSet() << 1 << 2 << 3 << 4 << 5)) - << qMakePair(KeyPress(nextItemKey), ViewState(6, QSet() << 6)) - << qMakePair(KeyPress(nextItemKey, Qt::ControlModifier), ViewState(7, QSet() << 6)) - << qMakePair(KeyPress(nextItemKey, Qt::ControlModifier), ViewState(8, QSet() << 6)) - << qMakePair(KeyPress(nextRowKey), ViewState(12, QSet() << 12)) - << qMakePair(KeyPress(nextRowKey), ViewState(17, QSet() << 17)) - << qMakePair(KeyPress(nextRowKey), ViewState(19, QSet() << 19)) - << qMakePair(KeyPress(previousRowKey), ViewState(17, QSet() << 17)) - << qMakePair(KeyPress(Qt::Key_End, Qt::ShiftModifier), ViewState(19, QSet() << 17 << 18 << 19)) - << qMakePair(KeyPress(previousRowKey, Qt::ShiftModifier), ViewState(14, QSet() << 14 << 15 << 16 << 17)) - << qMakePair(KeyPress(Qt::Key_Home), ViewState(0, QSet() << 0)); + << qMakePair(KeyPress(nextItemKey), ViewState(1, KItemSet() << 1)) + << qMakePair(KeyPress(nextRowKey, Qt::ShiftModifier), ViewState(3, KItemSet() << 1 << 2 << 3)) + << qMakePair(KeyPress(nextRowKey, Qt::ShiftModifier), ViewState(5, KItemSet() << 1 << 2 << 3 << 4 << 5)) + << qMakePair(KeyPress(nextItemKey), ViewState(6, KItemSet() << 6)) + << qMakePair(KeyPress(nextItemKey, Qt::ControlModifier), ViewState(7, KItemSet() << 6)) + << qMakePair(KeyPress(nextItemKey, Qt::ControlModifier), ViewState(8, KItemSet() << 6)) + << qMakePair(KeyPress(nextRowKey), ViewState(12, KItemSet() << 12)) + << qMakePair(KeyPress(nextRowKey), ViewState(17, KItemSet() << 17)) + << qMakePair(KeyPress(nextRowKey), ViewState(19, KItemSet() << 19)) + << qMakePair(KeyPress(previousRowKey), ViewState(17, KItemSet() << 17)) + << qMakePair(KeyPress(Qt::Key_End, Qt::ShiftModifier), ViewState(19, KItemSet() << 17 << 18 << 19)) + << qMakePair(KeyPress(previousRowKey, Qt::ShiftModifier), ViewState(14, KItemSet() << 14 << 15 << 16 << 17)) + << qMakePair(KeyPress(Qt::Key_Home), ViewState(0, KItemSet() << 0)); } const QString testName = @@ -463,14 +470,14 @@ QCOMPARE(m_view->m_layouter->m_columnCount, columnCount); QSignalSpy spySingleItemActivated(m_controller, SIGNAL(itemActivated(int))); - QSignalSpy spyMultipleItemsActivated(m_controller, SIGNAL(itemsActivated(QSet))); + QSignalSpy spyMultipleItemsActivated(m_controller, SIGNAL(itemsActivated(KItemSet))); while (!testList.isEmpty()) { const QPair test = testList.takeFirst(); const Qt::Key key = test.first.m_key; const Qt::KeyboardModifiers modifier = test.first.m_modifier; const int current = test.second.m_current; - const QSet selection = test.second.m_selection; + const KItemSet selection = test.second.m_selection; const bool activated = test.second.m_activated; QTest::keyClick(m_container, key, modifier); @@ -478,7 +485,7 @@ QCOMPARE(m_selectionManager->currentItem(), current); switch (selectionBehavior) { case KItemListController::NoSelection: QVERIFY(m_selectionManager->selectedItems().isEmpty()); break; - case KItemListController::SingleSelection: QCOMPARE(m_selectionManager->selectedItems(), QSet() << current); break; + case KItemListController::SingleSelection: QCOMPARE(m_selectionManager->selectedItems(), KItemSet() << current); break; case KItemListController::MultiSelection: QCOMPARE(m_selectionManager->selectedItems(), selection); break; } @@ -489,12 +496,12 @@ // The selected items should be activated. if (selection.count() == 1) { QVERIFY(!spySingleItemActivated.isEmpty()); - QCOMPARE(qvariant_cast(spySingleItemActivated.takeFirst().at(0)), selection.toList().at(0)); + QCOMPARE(qvariant_cast(spySingleItemActivated.takeFirst().at(0)), selection.first()); QVERIFY(spyMultipleItemsActivated.isEmpty()); } else { QVERIFY(spySingleItemActivated.isEmpty()); QVERIFY(!spyMultipleItemsActivated.isEmpty()); - QCOMPARE(qvariant_cast >(spyMultipleItemsActivated.takeFirst().at(0)), selection); + QCOMPARE(qvariant_cast(spyMultipleItemsActivated.takeFirst().at(0)), selection); } break; } @@ -634,7 +641,7 @@ group.writeEntry("SingleClick", restoreKGlobalSettingsSingleClick, KConfig::Persistent|KConfig::Global); config.sync(); KGlobalSettings::self()->emitChange(KGlobalSettings::SettingsChanged, KGlobalSettings::SETTINGS_MOUSE); - + iterations = 0; while (KGlobalSettings::singleClick() != restoreKGlobalSettingsSingleClick && iterations < maxIterations) { QTest::qWait(50); diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/tests/kitemlistselectionmanagertest.cpp netrunner-desktop-containment-4.13.0/dolphin/src/tests/kitemlistselectionmanagertest.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/tests/kitemlistselectionmanagertest.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/tests/kitemlistselectionmanagertest.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -78,9 +78,10 @@ void testChangeSelection(); void testDeleteCurrentItem_data(); void testDeleteCurrentItem(); + void testAnchoredSelectionAfterMovingItems(); private: - void verifySelectionChange(QSignalSpy& spy, const QSet& currentSelection, const QSet& previousSelection) const; + void verifySelectionChange(QSignalSpy& spy, const KItemSet& currentSelection, const KItemSet& previousSelection) const; KItemListSelectionManager* m_selectionManager; DummyModel* m_model; @@ -127,7 +128,7 @@ QCOMPARE(m_selectionManager->m_anchorItem, 5); // Items between current and anchor should be selected now - QCOMPARE(m_selectionManager->selectedItems(), QSet() << 4 << 5); + QCOMPARE(m_selectionManager->selectedItems(), KItemSet() << 4 << 5); QVERIFY(m_selectionManager->hasSelection()); // Change current item again and check the selection @@ -138,7 +139,7 @@ QCOMPARE(qvariant_cast(spyCurrent.at(0).at(1)), 4); spyCurrent.takeFirst(); - QCOMPARE(m_selectionManager->selectedItems(), QSet() << 2 << 3 << 4 << 5); + QCOMPARE(m_selectionManager->selectedItems(), KItemSet() << 2 << 3 << 4 << 5); QVERIFY(m_selectionManager->hasSelection()); // Inserting items should update current item and anchor item. @@ -155,7 +156,7 @@ QCOMPARE(m_selectionManager->m_anchorItem, 8); - QCOMPARE(m_selectionManager->selectedItems(), QSet() << 5 << 6 << 7 << 8); + QCOMPARE(m_selectionManager->selectedItems(), KItemSet() << 5 << 6 << 7 << 8); QVERIFY(m_selectionManager->hasSelection()); // Removing items should update current item and anchor item. @@ -172,12 +173,12 @@ QCOMPARE(m_selectionManager->m_anchorItem, 5); - QCOMPARE(m_selectionManager->selectedItems(), QSet() << 2 << 3 << 4 << 5); + QCOMPARE(m_selectionManager->selectedItems(), KItemSet() << 2 << 3 << 4 << 5); QVERIFY(m_selectionManager->hasSelection()); // Verify that clearSelection() also clears the anchored selection. m_selectionManager->clearSelection(); - QCOMPARE(m_selectionManager->selectedItems(), QSet()); + QCOMPARE(m_selectionManager->selectedItems(), KItemSet()); QVERIFY(!m_selectionManager->hasSelection()); m_selectionManager->endAnchoredSelection(); @@ -212,7 +213,7 @@ { // Select items 10 to 12 m_selectionManager->setSelected(10, 3); - QSet selectedItems = m_selectionManager->selectedItems(); + KItemSet selectedItems = m_selectionManager->selectedItems(); QCOMPARE(selectedItems.count(), 3); QVERIFY(selectedItems.contains(10)); QVERIFY(selectedItems.contains(11)); @@ -242,7 +243,7 @@ { // Select items 10 to 15 m_selectionManager->setSelected(10, 6); - QSet selectedItems = m_selectionManager->selectedItems(); + KItemSet selectedItems = m_selectionManager->selectedItems(); QCOMPARE(selectedItems.count(), 6); for (int i = 10; i <= 15; ++i) { QVERIFY(selectedItems.contains(i)); @@ -276,20 +277,20 @@ m_selectionManager->setCurrentItem(6); QCOMPARE(m_selectionManager->currentItem(), 6); - QCOMPARE(m_selectionManager->selectedItems(), QSet() << 5 << 6); + QCOMPARE(m_selectionManager->selectedItems(), KItemSet() << 5 << 6); m_selectionManager->setCurrentItem(4); QCOMPARE(m_selectionManager->currentItem(), 4); - QCOMPARE(m_selectionManager->selectedItems(), QSet() << 4 << 5); + QCOMPARE(m_selectionManager->selectedItems(), KItemSet() << 4 << 5); m_selectionManager->setCurrentItem(7); QCOMPARE(m_selectionManager->currentItem(), 7); - QCOMPARE(m_selectionManager->selectedItems(), QSet() << 5 << 6 << 7); + QCOMPARE(m_selectionManager->selectedItems(), KItemSet() << 5 << 6 << 7); // Ending the anchored selection should not change the selected items. m_selectionManager->endAnchoredSelection(); QVERIFY(!m_selectionManager->isAnchoredSelectionActive()); - QCOMPARE(m_selectionManager->selectedItems(), QSet() << 5 << 6 << 7); + QCOMPARE(m_selectionManager->selectedItems(), KItemSet() << 5 << 6 << 7); // Start a new anchored selection that overlaps the previous one m_selectionManager->beginAnchoredSelection(9); @@ -298,15 +299,15 @@ m_selectionManager->setCurrentItem(6); QCOMPARE(m_selectionManager->currentItem(), 6); - QCOMPARE(m_selectionManager->selectedItems(), QSet() << 5 << 6 << 7 << 8 << 9); + QCOMPARE(m_selectionManager->selectedItems(), KItemSet() << 5 << 6 << 7 << 8 << 9); m_selectionManager->setCurrentItem(10); QCOMPARE(m_selectionManager->currentItem(), 10); - QCOMPARE(m_selectionManager->selectedItems(), QSet() << 5 << 6 << 7 << 9 << 10); + QCOMPARE(m_selectionManager->selectedItems(), KItemSet() << 5 << 6 << 7 << 9 << 10); m_selectionManager->endAnchoredSelection(); QVERIFY(!m_selectionManager->isAnchoredSelectionActive()); - QCOMPARE(m_selectionManager->selectedItems(), QSet() << 5 << 6 << 7 << 9 << 10); + QCOMPARE(m_selectionManager->selectedItems(), KItemSet() << 5 << 6 << 7 << 9 << 10); } namespace { @@ -320,7 +321,7 @@ }; } -Q_DECLARE_METATYPE(QSet); +Q_DECLARE_METATYPE(KItemSet); Q_DECLARE_METATYPE(ChangeType); Q_DECLARE_METATYPE(KItemRange); Q_DECLARE_METATYPE(KItemRangeList); @@ -355,86 +356,95 @@ void KItemListSelectionManagerTest::testChangeSelection_data() { - QTest::addColumn >("initialSelection"); + QTest::addColumn("initialSelection"); QTest::addColumn("anchor"); QTest::addColumn("current"); - QTest::addColumn >("expectedSelection"); + QTest::addColumn("expectedSelection"); QTest::addColumn("changeType"); QTest::addColumn >("data"); - QTest::addColumn >("finalSelection"); + QTest::addColumn("finalSelection"); QTest::newRow("No change") - << (QSet() << 5 << 6) + << (KItemSet() << 5 << 6) << 2 << 3 - << (QSet() << 2 << 3 << 5 << 6) + << (KItemSet() << 2 << 3 << 5 << 6) << NoChange << QList() - << (QSet() << 2 << 3 << 5 << 6); + << (KItemSet() << 2 << 3 << 5 << 6); QTest::newRow("Insert Items") - << (QSet() << 5 << 6) + << (KItemSet() << 5 << 6) << 2 << 3 - << (QSet() << 2 << 3 << 5 << 6) + << (KItemSet() << 2 << 3 << 5 << 6) << InsertItems << (QList() << QVariant::fromValue(KItemRangeList() << KItemRange(1, 1) << KItemRange(5, 2) << KItemRange(10, 5))) - << (QSet() << 3 << 4 << 8 << 9); + << (KItemSet() << 3 << 4 << 8 << 9); QTest::newRow("Remove Items") - << (QSet() << 5 << 6) + << (KItemSet() << 5 << 6) << 2 << 3 - << (QSet() << 2 << 3 << 5 << 6) + << (KItemSet() << 2 << 3 << 5 << 6) << RemoveItems << (QList() << QVariant::fromValue(KItemRangeList() << KItemRange(1, 1) << KItemRange(3, 1) << KItemRange(10, 5))) - << (QSet() << 1 << 2 << 3 << 4); + << (KItemSet() << 1 << 2 << 3 << 4); QTest::newRow("Empty Anchored Selection") - << QSet() + << KItemSet() << 2 << 2 - << QSet() + << KItemSet() << EndAnchoredSelection << QList() - << QSet(); + << KItemSet(); QTest::newRow("Toggle selection") - << (QSet() << 1 << 3 << 4) + << (KItemSet() << 1 << 3 << 4) << 6 << 8 - << (QSet() << 1 << 3 << 4 << 6 << 7 << 8) + << (KItemSet() << 1 << 3 << 4 << 6 << 7 << 8) << SetSelected << (QList() << 0 << 10 << QVariant::fromValue(KItemListSelectionManager::Toggle)) - << (QSet() << 0 << 2 << 5 << 9); + << (KItemSet() << 0 << 2 << 5 << 9); // Swap items 2, 3 and 4, 5 QTest::newRow("Move items") - << (QSet() << 0 << 1 << 2 << 3) + << (KItemSet() << 0 << 1 << 2 << 3) << -1 << -1 - << (QSet() << 0 << 1 << 2 << 3) + << (KItemSet() << 0 << 1 << 2 << 3) << MoveItems << (QList() << QVariant::fromValue(KItemRange(2, 4)) << QVariant::fromValue(QList() << 4 << 5 << 2 << 3)) - << (QSet() << 0 << 1 << 4 << 5); + << (KItemSet() << 0 << 1 << 4 << 5); + + QTest::newRow("Move items with active anchored selection") + << KItemSet() + << 0 << 3 + << (KItemSet() << 0 << 1 << 2 << 3) + << MoveItems + << (QList() << QVariant::fromValue(KItemRange(2, 4)) + << QVariant::fromValue(QList() << 4 << 5 << 2 << 3)) + << (KItemSet() << 0 << 1 << 4 << 5); // Revert sort order QTest::newRow("Revert sort order") - << (QSet() << 0 << 1) + << (KItemSet() << 0 << 1) << 3 << 4 - << (QSet() << 0 << 1 << 3 << 4) + << (KItemSet() << 0 << 1 << 3 << 4) << MoveItems << (QList() << QVariant::fromValue(KItemRange(0, 10)) << QVariant::fromValue(QList() << 9 << 8 << 7 << 6 << 5 << 4 << 3 << 2 << 1 << 0)) - << (QSet() << 5 << 6 << 8 << 9); + << (KItemSet() << 5 << 6 << 8 << 9); } void KItemListSelectionManagerTest::testChangeSelection() { - QFETCH(QSet, initialSelection); + QFETCH(KItemSet, initialSelection); QFETCH(int, anchor); QFETCH(int, current); - QFETCH(QSet, expectedSelection); + QFETCH(KItemSet, expectedSelection); QFETCH(ChangeType, changeType); QFETCH(QList, data); - QFETCH(QSet, finalSelection); + QFETCH(KItemSet, finalSelection); - QSignalSpy spySelectionChanged(m_selectionManager, SIGNAL(selectionChanged(QSet,QSet))); + QSignalSpy spySelectionChanged(m_selectionManager, SIGNAL(selectionChanged(KItemSet,KItemSet))); // Initial selection should be empty QVERIFY(!m_selectionManager->hasSelection()); @@ -443,7 +453,7 @@ // Perform the initial selectiion m_selectionManager->setSelectedItems(initialSelection); - verifySelectionChange(spySelectionChanged, initialSelection, QSet()); + verifySelectionChange(spySelectionChanged, initialSelection, KItemSet()); // Perform an anchored selection. // Note that current and anchor index are equal first because this is the case in typical uses of the @@ -486,7 +496,7 @@ // Finally, clear the selection m_selectionManager->clearSelection(); - verifySelectionChange(spySelectionChanged, QSet(), finalSelection); + verifySelectionChange(spySelectionChanged, KItemSet(), finalSelection); } void KItemListSelectionManagerTest::testDeleteCurrentItem_data() @@ -519,9 +529,25 @@ QCOMPARE(m_selectionManager->currentItem(), newCurrentItemIndex); } +void KItemListSelectionManagerTest::testAnchoredSelectionAfterMovingItems() +{ + m_selectionManager->setCurrentItem(4); + m_selectionManager->beginAnchoredSelection(4); + + // Reverse the items between 0 and 5. + m_selectionManager->itemsMoved(KItemRange(0, 6), QList() << 5 << 4 << 3 << 2 << 1 << 0); + + QCOMPARE(m_selectionManager->currentItem(), 1); + QCOMPARE(m_selectionManager->m_anchorItem, 1); + + // Make 2 the current item -> 1 and 2 should be selected. + m_selectionManager->setCurrentItem(2); + QCOMPARE(m_selectionManager->selectedItems(), KItemSet() << 1 << 2); +} + void KItemListSelectionManagerTest::verifySelectionChange(QSignalSpy& spy, - const QSet& currentSelection, - const QSet& previousSelection) const + const KItemSet& currentSelection, + const KItemSet& previousSelection) const { QCOMPARE(m_selectionManager->selectedItems(), currentSelection); QCOMPARE(m_selectionManager->hasSelection(), !currentSelection.isEmpty()); @@ -540,8 +566,8 @@ else { QCOMPARE(spy.count(), 1); QList arguments = spy.takeFirst(); - QCOMPARE(qvariant_cast >(arguments.at(0)), currentSelection); - QCOMPARE(qvariant_cast >(arguments.at(1)), previousSelection); + QCOMPARE(qvariant_cast(arguments.at(0)), currentSelection); + QCOMPARE(qvariant_cast(arguments.at(1)), previousSelection); } } diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/tests/kitemsettest.cpp netrunner-desktop-containment-4.13.0/dolphin/src/tests/kitemsettest.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/tests/kitemsettest.cpp 1970-01-01 00:00:00.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/tests/kitemsettest.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -0,0 +1,612 @@ +/*************************************************************************** + * Copyright (C) 2013 by Frank Reininghaus * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#include + +#include "kitemviews/kitemset.h" + +#include + +Q_DECLARE_METATYPE(KItemRangeList); + +/** + * Converts a KItemRangeList to a KItemSet. + */ +KItemSet KItemRangeList2KItemSet(const KItemRangeList& itemRanges) +{ + KItemSet result; + foreach (const KItemRange& range, itemRanges) { + for (int i = range.index; i < range.index + range.count; ++i) { + result.insert(i); + } + } + return result; +} + +/** + * Converts a KItemRangeList to a QSet. + */ +QSet KItemRangeList2QSet(const KItemRangeList& itemRanges) +{ + QSet result; + foreach (const KItemRange& range, itemRanges) { + for (int i = range.index; i < range.index + range.count; ++i) { + result.insert(i); + } + } + return result; +} + +/** + * Converts a KItemRangeList to a QVector. + */ +QVector KItemRangeList2QVector(const KItemRangeList& itemRanges) +{ + QVector result; + foreach (const KItemRange& range, itemRanges) { + for (int i = range.index; i < range.index + range.count; ++i) { + result.append(i); + } + } + return result; +} + +/** + * Converts a KItemSet to a QSet. + */ +static QSet KItemSet2QSet(const KItemSet& itemSet) +{ + QSet result; + foreach (int i, itemSet) { + result.insert(i); + } + + // Check that the conversion was successful. + Q_ASSERT(itemSet.count() == result.count()); + + foreach (int i, itemSet) { + Q_ASSERT(result.contains(i)); + } + + foreach (int i, result) { + Q_ASSERT(itemSet.contains(i)); + } + + return result; +} + + +/** + * The main test class. + */ +class KItemSetTest : public QObject +{ + Q_OBJECT + +private slots: + void initTestCase(); + + void testConstruction_data(); + void testConstruction(); + void testIterators_data(); + void testIterators(); + void testFind_data(); + void testFind(); + void testChangingOneItem_data(); + void testChangingOneItem(); + void testAddSets_data(); + void testAddSets(); + /* + void testSubtractSets_data(); + void testSubtractSets(); + */ + void testSymmetricDifference_data(); + void testSymmetricDifference(); + +private: + QHash m_testCases; +}; + +void KItemSetTest::initTestCase() +{ + m_testCases.insert("empty", KItemRangeList()); + m_testCases.insert("[0]", KItemRangeList() << KItemRange(0, 1)); + m_testCases.insert("[1]", KItemRangeList() << KItemRange(1, 1)); + m_testCases.insert("[1, 2]", KItemRangeList() << KItemRange(1, 2)); + m_testCases.insert("[1, 2] [5]", KItemRangeList() << KItemRange(1, 2) << KItemRange(5, 1)); + m_testCases.insert("[1] [4, 5]", KItemRangeList() << KItemRange(1, 1) << KItemRange(4, 2)); + m_testCases.insert("[1, 2] [4, 5]", KItemRangeList() << KItemRange(1, 2) << KItemRange(4, 2)); + m_testCases.insert("[1, 5]", KItemRangeList() << KItemRange(1, 5)); + m_testCases.insert("[1, 2] [4, 5] [7] [9, 10] [13] [20, 25] [30]", + KItemRangeList() << KItemRange(1, 2) << KItemRange(4, 2) << KItemRange(7, 1) << KItemRange(9, 2) << KItemRange(20, 6) << KItemRange(30, 1)); + m_testCases.insert("[-10, -1]", KItemRangeList() << KItemRange(-10, 10)); + m_testCases.insert("[-10, 0]", KItemRangeList() << KItemRange(-10, 11)); + m_testCases.insert("[-10, 1]", KItemRangeList() << KItemRange(-10, 12)); + m_testCases.insert("[0, 9]", KItemRangeList() << KItemRange(0, 10)); + m_testCases.insert("[0, 19]", KItemRangeList() << KItemRange(0, 10)); +} + +void KItemSetTest::testConstruction_data() +{ + QTest::addColumn("itemRanges"); + + QHash::const_iterator it = m_testCases.constBegin(); + const QHash::const_iterator end = m_testCases.constEnd(); + + while (it != end) { + QTest::newRow(it.key()) << it.value(); + ++it; + } +} + +void KItemSetTest::testConstruction() +{ + QFETCH(KItemRangeList, itemRanges); + + KItemSet itemSet = KItemRangeList2KItemSet(itemRanges); + QSet itemsQSet = KItemRangeList2QSet(itemRanges); + + QVERIFY(itemSet.isValid()); + QVERIFY(itemSet.count() == itemsQSet.count()); + QCOMPARE(KItemSet2QSet(itemSet), itemsQSet); + + // Test copy constructor. + KItemSet copy(itemSet); + QCOMPARE(itemSet, copy); + copy.clear(); + QVERIFY(itemSet != copy || itemSet.isEmpty()); + + // Clear the set. + itemSet.clear(); + QVERIFY(itemSet.isEmpty()); + QCOMPARE(itemSet.count(), 0); +} + +void KItemSetTest::testIterators_data() +{ + QTest::addColumn("itemRanges"); + + QHash::const_iterator it = m_testCases.constBegin(); + const QHash::const_iterator end = m_testCases.constEnd(); + + while (it != end) { + QTest::newRow(it.key()) << it.value(); + ++it; + } +} + +/** + * Verify that the iterators work exactly like their counterparts for the + * equivalent QVector. + */ +void KItemSetTest::testIterators() +{ + QFETCH(KItemRangeList, itemRanges); + + KItemSet itemSet = KItemRangeList2KItemSet(itemRanges); + QVector itemsQVector = KItemRangeList2QVector(itemRanges); + + QVERIFY(itemSet.isValid()); + QVERIFY(itemSet.count() == itemsQVector.count()); + + if (itemSet.count() == 0) { + QVERIFY(itemSet.isEmpty()); + QVERIFY(itemSet.begin() == itemSet.end()); + QVERIFY(itemSet.constBegin() == itemSet.constEnd()); + } else { + QVERIFY(!itemSet.isEmpty()); + QVERIFY(itemSet.begin() != itemSet.end()); + QVERIFY(itemSet.constBegin() != itemSet.constEnd()); + + const int min = itemsQVector.first(); + const int max = itemsQVector.last(); + + QCOMPARE(*itemSet.begin(), min); + QCOMPARE(*itemSet.constBegin(), min); + QCOMPARE(itemSet.first(), min); + + QCOMPARE(*(--itemSet.end()), max); + QCOMPARE(*(--itemSet.constEnd()), max); + QCOMPARE(itemSet.last(), max); + } + + // Test iterating using the different iterators. + QVector testQVector; + for (KItemSet::iterator it = itemSet.begin(), end = itemSet.end(); it != end; ++it) { + testQVector.append(*it); + } + QCOMPARE(testQVector, itemsQVector); + + testQVector.clear(); + for (KItemSet::const_iterator it = itemSet.constBegin(), end = itemSet.constEnd(); it != end; ++it) { + testQVector.append(*it); + } + QCOMPARE(testQVector, itemsQVector); + + testQVector.clear(); + foreach (int i, itemSet) { + testQVector.append(i); + } + QCOMPARE(testQVector, itemsQVector); + + // Verify that both variants of the (const)iterator's operator++ and + // operator-- functions behave exactly like their QVector equivalents. + KItemSet::iterator it1 = itemSet.begin(); + KItemSet::iterator it2 = itemSet.begin(); + KItemSet::const_iterator constIt1 = itemSet.constBegin(); + KItemSet::const_iterator constIt2 = itemSet.constBegin(); + QVector::iterator vectorIt1 = itemsQVector.begin(); + QVector::iterator vectorIt2 = itemsQVector.begin(); + QVector::const_iterator vectorConstIt1 = itemsQVector.constBegin(); + QVector::const_iterator vectorConstIt2 = itemsQVector.constBegin(); + + while (it1 != itemSet.end()) { + if (it1 != --itemSet.end()) { + QCOMPARE(*(++it1), *(++vectorIt1)); + QCOMPARE(*(++constIt1), *(++vectorConstIt1)); + } else { + QCOMPARE(++it1, itemSet.end()); + QCOMPARE(++vectorIt1, itemsQVector.end()); + QCOMPARE(++constIt1, itemSet.constEnd()); + QCOMPARE(++vectorConstIt1, itemsQVector.constEnd()); + } + + QCOMPARE(*(it2++), *(vectorIt2++)); + QCOMPARE(*(constIt2++), *(vectorConstIt2++)); + + QCOMPARE(it1, it2); + QCOMPARE(constIt1, constIt2); + QCOMPARE(KItemSet::const_iterator(it1), constIt1); + } + + QCOMPARE(it1, itemSet.end()); + QCOMPARE(it2, itemSet.end()); + QCOMPARE(constIt1, itemSet.constEnd()); + QCOMPARE(constIt2, itemSet.constEnd()); + QCOMPARE(vectorIt1, itemsQVector.end()); + QCOMPARE(vectorIt2, itemsQVector.end()); + QCOMPARE(vectorConstIt1, itemsQVector.constEnd()); + QCOMPARE(vectorConstIt2, itemsQVector.constEnd()); + + while (it1 != itemSet.begin()) { + QCOMPARE(*(--it1), *(--vectorIt1)); + QCOMPARE(*(--constIt1), *(--vectorConstIt1)); + + if (it2 != itemSet.end()) { + QCOMPARE(*(it2--), *(vectorIt2--)); + QCOMPARE(*(constIt2--), *(vectorConstIt2--)); + } else { + QCOMPARE(it2--, itemSet.end()); + QCOMPARE(vectorIt2--, itemsQVector.end()); + QCOMPARE(constIt2--, itemSet.constEnd()); + QCOMPARE(vectorConstIt2--, itemsQVector.constEnd()); + } + + QCOMPARE(it1, it2); + QCOMPARE(constIt1, constIt2); + QCOMPARE(KItemSet::const_iterator(it1), constIt1); + } + + QCOMPARE(it1, itemSet.begin()); + QCOMPARE(it2, itemSet.begin()); + QCOMPARE(constIt1, itemSet.constBegin()); + QCOMPARE(constIt2, itemSet.constBegin()); + QCOMPARE(vectorIt1, itemsQVector.begin()); + QCOMPARE(vectorIt2, itemsQVector.begin()); + QCOMPARE(vectorConstIt1, itemsQVector.constBegin()); + QCOMPARE(vectorConstIt2, itemsQVector.constBegin()); +} + +void KItemSetTest::testFind_data() +{ + QTest::addColumn("itemRanges"); + + QHash::const_iterator it = m_testCases.constBegin(); + const QHash::const_iterator end = m_testCases.constEnd(); + + while (it != end) { + QTest::newRow(it.key()) << it.value(); + ++it; + } +} + +/** + * Test all functions that find items: + * contais(int), find(int), constFind(int) + */ +void KItemSetTest::testFind() +{ + QFETCH(KItemRangeList, itemRanges); + + KItemSet itemSet = KItemRangeList2KItemSet(itemRanges); + QSet itemsQSet = KItemRangeList2QSet(itemRanges); + + QVERIFY(itemSet.isValid()); + QVERIFY(itemSet.count() == itemsQSet.count()); + + // Find the minimum and maximum items. + int min; + int max; + + if (itemSet.count() == 0) { + // Use some arbitrary values for the upcoming tests. + min = 0; + max = 5; + } else { + min = *itemSet.begin(); + max = *(--itemSet.end()); + } + + // Test contains(int), find(int), and constFind(int) + // for items between min - 2 and max + 2. + for (int i = min - 2; i <= max + 2; ++i) { + const KItemSet::iterator it = itemSet.find(i); + const KItemSet::const_iterator constIt = itemSet.constFind(i); + QCOMPARE(KItemSet::const_iterator(it), constIt); + + if (itemsQSet.contains(i)) { + QVERIFY(itemSet.contains(i)); + QCOMPARE(*it, i); + QCOMPARE(*constIt, i); + } else { + QVERIFY(!itemSet.contains(i)); + QCOMPARE(it, itemSet.end()); + QCOMPARE(constIt, itemSet.constEnd()); + } + } +} + +void KItemSetTest::testChangingOneItem_data() +{ + QTest::addColumn("itemRanges"); + + QHash::const_iterator it = m_testCases.constBegin(); + const QHash::const_iterator end = m_testCases.constEnd(); + + while (it != end) { + QTest::newRow(it.key()) << it.value(); + ++it; + } +} + +/** + * Test all functions that change a single item: + * insert(int), remove(int), erase(KItemSet::iterator) + */ +void KItemSetTest::testChangingOneItem() +{ + QFETCH(KItemRangeList, itemRanges); + + KItemSet itemSet = KItemRangeList2KItemSet(itemRanges); + QSet itemsQSet = KItemRangeList2QSet(itemRanges); + + QVERIFY(itemSet.isValid()); + QVERIFY(itemSet.count() == itemsQSet.count()); + + // Find the minimum and maximum items. + int min; + int max; + + if (itemSet.count() == 0) { + // Use some arbitrary values for the upcoming tests. + min = 0; + max = 5; + } else { + min = *itemSet.begin(); + max = *(--itemSet.end()); + } + + // Test insert(int), remove(int), and erase(KItemSet::iterator) + // for items between min - 2 and max + 2. + for (int i = min - 2; i <= max + 2; ++i) { + + // Test insert(int). + { + KItemSet tmp(itemSet); + const KItemSet::iterator insertedIt = tmp.insert(i); + QCOMPARE(*insertedIt, i); + + QVERIFY(tmp.isValid()); + QVERIFY(tmp.contains(i)); + + QSet expectedQSet = itemsQSet; + expectedQSet.insert(i); + QCOMPARE(KItemSet2QSet(tmp), expectedQSet); + + if (!itemSet.contains(i)) { + QVERIFY(itemSet != tmp); + QCOMPARE(tmp.count(), itemSet.count() + 1); + } else { + QCOMPARE(itemSet, tmp); + } + + QCOMPARE(i, *tmp.find(i)); + QCOMPARE(i, *tmp.constFind(i)); + + // Erase the new item and check that we get the old KItemSet back. + tmp.erase(tmp.find(i)); + QVERIFY(tmp.isValid()); + QVERIFY(!tmp.contains(i)); + + if (!itemSet.contains(i)) { + QCOMPARE(itemSet, tmp); + } + + expectedQSet.remove(i); + QCOMPARE(KItemSet2QSet(tmp), expectedQSet); + } + + // Test remove(int). + { + KItemSet tmp(itemSet); + const bool removed = tmp.remove(i); + + QCOMPARE(removed, itemSet.contains(i)); + + QVERIFY(tmp.isValid()); + QVERIFY(!tmp.contains(i)); + + QSet expectedQSet = itemsQSet; + expectedQSet.remove(i); + QCOMPARE(KItemSet2QSet(tmp), expectedQSet); + + if (itemSet.contains(i)) { + QVERIFY(itemSet != tmp); + QCOMPARE(tmp.count(), itemSet.count() - 1); + } else { + QCOMPARE(itemSet, tmp); + } + + QCOMPARE(tmp.end(), tmp.find(i)); + QCOMPARE(tmp.constEnd(), tmp.constFind(i)); + } + + // Test erase(KItemSet::iterator). + if (itemSet.contains(i)) { + KItemSet tmp(itemSet); + KItemSet::iterator it = tmp.find(i); + it = tmp.erase(it); + + QVERIFY(tmp.isValid()); + QVERIFY(!tmp.contains(i)); + + QSet expectedQSet = itemsQSet; + expectedQSet.remove(i); + QCOMPARE(KItemSet2QSet(tmp), expectedQSet); + + if (itemSet.contains(i)) { + QVERIFY(itemSet != tmp); + QCOMPARE(tmp.count(), itemSet.count() - 1); + } else { + QCOMPARE(itemSet, tmp); + } + + QCOMPARE(tmp.end(), tmp.find(i)); + QCOMPARE(tmp.constEnd(), tmp.constFind(i)); + + // Check the returen value, now contained in 'it'. + if (i == max) { + QCOMPARE(it, tmp.end()); + } else { + // it now points to the next item. + QVERIFY(tmp.contains(*it)); + for (int j = i; j < *it; ++j) { + QVERIFY(!tmp.contains(j)); + } + } + } + } + + // Clear the set. + itemSet.clear(); + QVERIFY(itemSet.isEmpty()); + QCOMPARE(itemSet.count(), 0); +} + +void KItemSetTest::testAddSets_data() +{ + QTest::addColumn("itemRanges1"); + QTest::addColumn("itemRanges2"); + + QHash::const_iterator it1 = m_testCases.constBegin(); + const QHash::const_iterator end = m_testCases.constEnd(); + + while (it1 != end) { + QHash::const_iterator it2 = m_testCases.constBegin(); + + while (it2 != end) { + QByteArray name = it1.key() + QByteArray(" + ") + it2.key(); + QTest::newRow(name) << it1.value() << it2.value(); + ++it2; + } + + ++it1; + } +} + +void KItemSetTest::testAddSets() +{ + QFETCH(KItemRangeList, itemRanges1); + QFETCH(KItemRangeList, itemRanges2); + + KItemSet itemSet1 = KItemRangeList2KItemSet(itemRanges1); + QSet itemsQSet1 = KItemRangeList2QSet(itemRanges1); + + KItemSet itemSet2 = KItemRangeList2KItemSet(itemRanges2); + QSet itemsQSet2 = KItemRangeList2QSet(itemRanges2); + + KItemSet sum = itemSet1 + itemSet2; + QSet sumQSet = itemsQSet1 + itemsQSet2; + + QCOMPARE(sum.count(), sumQSet.count()); + QCOMPARE(KItemSet2QSet(sum), sumQSet); +} + +void KItemSetTest::testSymmetricDifference_data() +{ + QTest::addColumn("itemRanges1"); + QTest::addColumn("itemRanges2"); + + QHash::const_iterator it1 = m_testCases.constBegin(); + const QHash::const_iterator end = m_testCases.constEnd(); + + while (it1 != end) { + QHash::const_iterator it2 = m_testCases.constBegin(); + + while (it2 != end) { + QByteArray name = it1.key() + QByteArray(" ^ ") + it2.key(); + QTest::newRow(name) << it1.value() << it2.value(); + ++it2; + } + + ++it1; + } +} + +void KItemSetTest::testSymmetricDifference() +{ + QFETCH(KItemRangeList, itemRanges1); + QFETCH(KItemRangeList, itemRanges2); + + KItemSet itemSet1 = KItemRangeList2KItemSet(itemRanges1); + QSet itemsQSet1 = KItemRangeList2QSet(itemRanges1); + + KItemSet itemSet2 = KItemRangeList2KItemSet(itemRanges2); + QSet itemsQSet2 = KItemRangeList2QSet(itemRanges2); + + KItemSet symmetricDifference = itemSet1 ^ itemSet2; + QSet symmetricDifferenceQSet = (itemsQSet1 - itemsQSet2) + (itemsQSet2 - itemsQSet1); + + QCOMPARE(symmetricDifference.count(), symmetricDifferenceQSet.count()); + QCOMPARE(KItemSet2QSet(symmetricDifference), symmetricDifferenceQSet); + + // Check commutativity. + QCOMPARE(itemSet2 ^ itemSet1, symmetricDifference); + + // Some more checks: + // itemSet1 ^ symmetricDifference == itemSet2, + // itemSet2 ^ symmetricDifference == itemSet1. + QCOMPARE(itemSet1 ^ symmetricDifference, itemSet2); + QCOMPARE(itemSet2 ^ symmetricDifference, itemSet1); +} + + +QTEST_KDEMAIN(KItemSetTest, NoGUI) + +#include "kitemsettest.moc" diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/views/dolphinitemlistview.cpp netrunner-desktop-containment-4.13.0/dolphin/src/views/dolphinitemlistview.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/views/dolphinitemlistview.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/views/dolphinitemlistview.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -89,10 +89,7 @@ beginTransaction(); setEnabledSelectionToggles(GeneralSettings::showSelectionToggle()); - - const bool expandableFolders = (itemLayout() == KFileItemListView::DetailsLayout) && - DetailsModeSettings::expandableFolders(); - setSupportsItemExpanding(expandableFolders); + setSupportsItemExpanding(itemLayoutSupportsItemExpanding(itemLayout())); updateFont(); updateGridSize(); @@ -119,19 +116,19 @@ return new KItemListWidgetCreator(); } -void DolphinItemListView::onItemLayoutChanged(ItemLayout current, ItemLayout previous) +bool DolphinItemListView::itemLayoutSupportsItemExpanding(ItemLayout layout) const { - Q_UNUSED(previous); + return layout == DetailsLayout && DetailsModeSettings::expandableFolders(); +} - if (current == DetailsLayout) { - setSupportsItemExpanding(DetailsModeSettings::expandableFolders()); - setHeaderVisible(true); - } else { - setHeaderVisible(false); - } +void DolphinItemListView::onItemLayoutChanged(ItemLayout current, ItemLayout previous) +{ + setHeaderVisible(current == DetailsLayout); updateFont(); updateGridSize(); + + KFileItemListView::onItemLayoutChanged(current, previous); } void DolphinItemListView::onPreviewsShownChanged(bool shown) @@ -147,6 +144,26 @@ updateGridSize(); } +void DolphinItemListView::updateFont() +{ + const ViewModeSettings settings(viewMode()); + + if (settings.useSystemFont()) { + KItemListView::updateFont(); + } else { + QFont font(settings.fontFamily(), qRound(settings.fontSize())); + font.setItalic(settings.italicFont()); + font.setWeight(settings.fontWeight()); + font.setPointSizeF(settings.fontSize()); + + KItemListStyleOption option = styleOption(); + option.font = font; + option.fontMetrics = QFontMetrics(font); + + setStyleOption(option); + } +} + void DolphinItemListView::updateGridSize() { const ViewModeSettings settings(viewMode()); @@ -163,7 +180,8 @@ // Calculate the item-width and item-height int itemWidth; int itemHeight; - QSize maxTextSize; + int maxTextLines = 0; + int maxTextWidth = 0; switch (itemLayout()) { case KFileItemListView::IconsLayout: { @@ -183,16 +201,10 @@ } itemHeight = padding * 3 + iconSize + option.fontMetrics.lineSpacing(); - if (IconsModeSettings::maximumTextLines() > 0) { - // A restriction is given for the maximum number of textlines (0 means - // having no restriction) - const int additionalInfoCount = visibleRoles().count() - 1; - const int maxAdditionalLines = additionalInfoCount + IconsModeSettings::maximumTextLines(); - maxTextSize.rheight() = option.fontMetrics.lineSpacing() * maxAdditionalLines; - } horizontalMargin = 4; verticalMargin = 8; + maxTextLines = IconsModeSettings::maximumTextLines(); break; } case KFileItemListView::CompactLayout: { @@ -203,8 +215,7 @@ if (CompactModeSettings::maximumTextWidthIndex() > 0) { // A restriction is given for the maximum width of the text (0 means // having no restriction) - maxTextSize.rwidth() = option.fontMetrics.height() * 10 * - CompactModeSettings::maximumTextWidthIndex(); + maxTextWidth = option.fontMetrics.height() * 10 * CompactModeSettings::maximumTextWidthIndex(); } horizontalMargin = 8; @@ -227,30 +238,14 @@ option.horizontalMargin = horizontalMargin; option.verticalMargin = verticalMargin; option.iconSize = iconSize; - option.maxTextSize = maxTextSize; + option.maxTextLines = maxTextLines; + option.maxTextWidth = maxTextWidth; beginTransaction(); setStyleOption(option); setItemSize(QSizeF(itemWidth, itemHeight)); endTransaction(); } -void DolphinItemListView::updateFont() -{ - KItemListStyleOption option = styleOption(); - - const ViewModeSettings settings(viewMode()); - - QFont font(settings.fontFamily(), qRound(settings.fontSize())); - font.setItalic(settings.italicFont()); - font.setWeight(settings.fontWeight()); - font.setPointSizeF(settings.fontSize()); - - option.font = font; - option.fontMetrics = QFontMetrics(font); - - setStyleOption(option); -} - ViewModeSettings::ViewMode DolphinItemListView::viewMode() const { ViewModeSettings::ViewMode mode; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/views/dolphinitemlistview.h netrunner-desktop-containment-4.13.0/dolphin/src/views/dolphinitemlistview.h --- netrunner-desktop-containment-4.11.1/dolphin/src/views/dolphinitemlistview.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/views/dolphinitemlistview.h 2014-05-26 15:31:22.000000000 +0000 @@ -50,14 +50,16 @@ protected: virtual KItemListWidgetCreatorBase* defaultWidgetCreator() const; + virtual bool itemLayoutSupportsItemExpanding(ItemLayout layout) const; virtual void onItemLayoutChanged(ItemLayout current, ItemLayout previous); virtual void onPreviewsShownChanged(bool shown); virtual void onVisibleRolesChanged(const QList& current, const QList& previous); + virtual void updateFont(); + private: void updateGridSize(); - void updateFont(); ViewModeSettings::ViewMode viewMode() const; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/views/dolphinnewfilemenuobserver.cpp netrunner-desktop-containment-4.13.0/dolphin/src/views/dolphinnewfilemenuobserver.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/views/dolphinnewfilemenuobserver.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/views/dolphinnewfilemenuobserver.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -20,7 +20,7 @@ #include "dolphinnewfilemenuobserver.h" #include -#include +#include "dolphinnewfilemenu.h" class DolphinNewFileMenuObserverSingleton { @@ -34,20 +34,24 @@ return s_DolphinNewFileMenuObserver->instance; } -void DolphinNewFileMenuObserver::attach(const KNewFileMenu* menu) +void DolphinNewFileMenuObserver::attach(const DolphinNewFileMenu* menu) { connect(menu, SIGNAL(fileCreated(KUrl)), this, SIGNAL(itemCreated(KUrl))); connect(menu, SIGNAL(directoryCreated(KUrl)), this, SIGNAL(itemCreated(KUrl))); + connect(menu, SIGNAL(errorMessage(QString)), + this, SIGNAL(errorMessage(QString))); } -void DolphinNewFileMenuObserver::detach(const KNewFileMenu* menu) +void DolphinNewFileMenuObserver::detach(const DolphinNewFileMenu* menu) { disconnect(menu, SIGNAL(fileCreated(KUrl)), this, SIGNAL(itemCreated(KUrl))); disconnect(menu, SIGNAL(directoryCreated(KUrl)), this, SIGNAL(itemCreated(KUrl))); + disconnect(menu, SIGNAL(errorMessage(QString)), + this, SIGNAL(errorMessage(QString))); } DolphinNewFileMenuObserver::DolphinNewFileMenuObserver() : diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/views/dolphinnewfilemenuobserver.h netrunner-desktop-containment-4.13.0/dolphin/src/views/dolphinnewfilemenuobserver.h --- netrunner-desktop-containment-4.11.1/dolphin/src/views/dolphinnewfilemenuobserver.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/views/dolphinnewfilemenuobserver.h 2014-05-26 15:31:22.000000000 +0000 @@ -24,7 +24,7 @@ #include "libdolphin_export.h" -class KNewFileMenu; +class DolphinNewFileMenu; class KUrl; /** @@ -40,11 +40,12 @@ public: static DolphinNewFileMenuObserver& instance(); - void attach(const KNewFileMenu* menu); - void detach(const KNewFileMenu* menu); + void attach(const DolphinNewFileMenu* menu); + void detach(const DolphinNewFileMenu* menu); signals: void itemCreated(const KUrl& url); + void errorMessage(const QString& error); private: DolphinNewFileMenuObserver(); diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/views/dolphinviewactionhandler.cpp netrunner-desktop-containment-4.13.0/dolphin/src/views/dolphinviewactionhandler.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/views/dolphinviewactionhandler.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/views/dolphinviewactionhandler.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -20,7 +20,7 @@ #include "dolphinviewactionhandler.h" -#include +#include #include "settings/viewpropertiesdialog.h" #include "views/dolphinview.h" @@ -39,12 +39,12 @@ #include #include -#ifdef HAVE_NEPOMUK - #include -#endif - #include +#ifdef HAVE_BALOO + #include +#endif + DolphinViewActionHandler::DolphinViewActionHandler(KActionCollection* collection, QObject* parent) : QObject(parent), m_actionCollection(collection), @@ -84,6 +84,8 @@ this, SLOT(slotSortRoleChanged(QByteArray))); connect(view, SIGNAL(zoomLevelChanged(int,int)), this, SLOT(slotZoomLevelChanged(int,int))); + connect(view, SIGNAL(writeStateChanged(bool)), + this, SLOT(slotWriteStateChanged(bool))); } DolphinView* DolphinViewActionHandler::currentView() @@ -99,6 +101,7 @@ newDirAction->setText(i18nc("@action", "Create Folder...")); newDirAction->setShortcut(Qt::Key_F10); newDirAction->setIcon(KIcon("folder-new")); + newDirAction->setEnabled(false); // Will be enabled in slotWriteStateChanged(bool) if the current URL is writable connect(newDirAction, SIGNAL(triggered()), this, SIGNAL(createDirectory())); // File menu @@ -234,14 +237,10 @@ KActionMenu* groupMenu = 0; QActionGroup* groupMenuGroup = 0; - bool nepomukRunning = false; bool indexingEnabled = false; -#ifdef HAVE_NEPOMUK - nepomukRunning = (Nepomuk2::ResourceManager::instance()->initialized()); - if (nepomukRunning) { - KConfig config("nepomukserverrc"); - indexingEnabled = config.group("Service-nepomukfileindexer").readEntry("autostart", true); - } +#ifdef HAVE_BALOO + Baloo::IndexerConfig config; + indexingEnabled = config.fileIndexingEnabled(); #endif const QList rolesInfo = KFileItemModel::rolesInformation(); @@ -281,8 +280,8 @@ action->setText(info.translation); action->setData(info.role); - const bool enable = (!info.requiresNepomuk && !info.requiresIndexer) || - (info.requiresNepomuk && nepomukRunning) || + const bool enable = (!info.requiresBaloo && !info.requiresIndexer) || + (info.requiresBaloo) || (info.requiresIndexer && indexingEnabled); action->setEnabled(enable); @@ -482,6 +481,11 @@ showHiddenFilesAction->setChecked(shown); } +void DolphinViewActionHandler::slotWriteStateChanged(bool isFolderWritable) +{ + m_actionCollection->action("create_dir")->setEnabled(isFolderWritable); +} + KToggleAction* DolphinViewActionHandler::iconsModeAction() { KToggleAction* iconsView = m_actionCollection->add("icons"); diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/views/dolphinviewactionhandler.h netrunner-desktop-containment-4.13.0/dolphin/src/views/dolphinviewactionhandler.h --- netrunner-desktop-containment-4.11.1/dolphin/src/views/dolphinviewactionhandler.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/views/dolphinviewactionhandler.h 2014-05-26 15:31:22.000000000 +0000 @@ -197,6 +197,11 @@ void slotHiddenFilesShownChanged(bool shown); /** + * Updates the state of the 'Create Folder...' action. + */ + void slotWriteStateChanged(bool isFolderWritable); + + /** * Opens the view properties dialog, which allows to modify the properties * of the currently active view. */ diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/views/dolphinview.cpp netrunner-desktop-containment-4.13.0/dolphin/src/views/dolphinview.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/views/dolphinview.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/views/dolphinview.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -20,7 +20,7 @@ #include "dolphinview.h" -#include +#include #include #include @@ -74,8 +74,8 @@ #include "views/tooltips/tooltipmanager.h" #include "zoomlevelinfo.h" -#ifdef HAVE_NEPOMUK - #include +#ifdef HAVE_BALOO + #include #endif namespace { @@ -145,7 +145,7 @@ controller->setSelectionBehavior(KItemListController::MultiSelection); connect(controller, SIGNAL(itemActivated(int)), this, SLOT(slotItemActivated(int))); - connect(controller, SIGNAL(itemsActivated(QSet)), this, SLOT(slotItemsActivated(QSet))); + connect(controller, SIGNAL(itemsActivated(KItemSet)), this, SLOT(slotItemsActivated(KItemSet))); connect(controller, SIGNAL(itemMiddleClicked(int)), this, SLOT(slotItemMiddleClicked(int))); connect(controller, SIGNAL(itemContextMenuRequested(int,QPointF)), this, SLOT(slotItemContextMenuRequested(int,QPointF))); connect(controller, SIGNAL(viewContextMenuRequested(QPointF)), this, SLOT(slotViewContextMenuRequested(QPointF))); @@ -154,6 +154,7 @@ connect(controller, SIGNAL(itemHovered(int)), this, SLOT(slotItemHovered(int))); connect(controller, SIGNAL(itemUnhovered(int)), this, SLOT(slotItemUnhovered(int))); connect(controller, SIGNAL(itemDropEvent(int,QGraphicsSceneDragDropEvent*)), this, SLOT(slotItemDropEvent(int,QGraphicsSceneDragDropEvent*))); + connect(controller, SIGNAL(escapePressed()), this, SLOT(stopLoading())); connect(controller, SIGNAL(modelChanged(KItemModelBase*,KItemModelBase*)), this, SLOT(slotModelChanged(KItemModelBase*,KItemModelBase*))); connect(m_model, SIGNAL(directoryLoadingStarted()), this, SLOT(slotDirectoryLoadingStarted())); @@ -183,8 +184,8 @@ this, SLOT(slotHeaderColumnWidthChanged(QByteArray,qreal,qreal))); KItemListSelectionManager* selectionManager = controller->selectionManager(); - connect(selectionManager, SIGNAL(selectionChanged(QSet,QSet)), - this, SLOT(slotSelectionChanged(QSet,QSet))); + connect(selectionManager, SIGNAL(selectionChanged(KItemSet,KItemSet)), + this, SLOT(slotSelectionChanged(KItemSet,KItemSet))); m_toolTipManager = new ToolTipManager(this); @@ -349,14 +350,9 @@ KFileItemList DolphinView::selectedItems() const { const KItemListSelectionManager* selectionManager = m_container->controller()->selectionManager(); - QList selectedIndexes = selectionManager->selectedItems().toList(); - - qSort(selectedIndexes); KFileItemList selectedItems; - QListIterator it(selectedIndexes); - while (it.hasNext()) { - const int index = it.next(); + foreach (int index, selectionManager->selectedItems()) { selectedItems.append(m_model->fileItem(index)); } return selectedItems; @@ -389,9 +385,9 @@ for (int index = 0; index < m_model->count(); index++) { const KFileItem item = m_model->fileItem(index); if (pattern.exactMatch(item.text())) { - // An alternative approach would be to store the matching items in a QSet and + // An alternative approach would be to store the matching items in a KItemSet and // select them in one go after the loop, but we'd need a new function - // KItemListSelectionManager::setSelected(QSet, SelectionMode mode) + // KItemListSelectionManager::setSelected(KItemSet, SelectionMode mode) // for that. selectionManager->setSelected(index, 1, mode); } @@ -485,11 +481,6 @@ restoreState(restoreStream); } -void DolphinView::stopLoading() -{ - m_model->cancelDirectoryLoading(); -} - void DolphinView::readSettings() { const int oldZoomLevel = m_view->zoomLevel(); @@ -556,8 +547,8 @@ } if (folderCount + fileCount == 1) { - // If only one item is selected, show the filename - filesText = i18nc("@info:status", "%1 selected", list.first().text()); + // If only one item is selected, show info about it + return list.first().getStatusBarInfo(); } else { // At least 2 items are selected foldersText = i18ncp("@info:status", "1 Folder selected", "%1 Folders selected", folderCount); @@ -658,6 +649,8 @@ const int index = m_model->index(items.first()); m_view->editRole(index, "text"); + hideToolTip(); + connect(m_view, SIGNAL(roleEditingFinished(int,QByteArray,QVariant)), this, SLOT(slotRoleEditingFinished(int,QByteArray,QVariant))); } else { @@ -724,6 +717,11 @@ } } +void DolphinView::stopLoading() +{ + m_model->cancelDirectoryLoading(); +} + bool DolphinView::eventFilter(QObject* watched, QEvent* event) { switch (event->type()) { @@ -802,7 +800,7 @@ } } -void DolphinView::slotItemsActivated(const QSet& indexes) +void DolphinView::slotItemsActivated(const KItemSet& indexes) { Q_ASSERT(indexes.count() >= 2); @@ -817,9 +815,7 @@ KFileItemList items; items.reserve(indexes.count()); - QSetIterator it(indexes); - while (it.hasNext()) { - const int index = it.next(); + foreach (int index, indexes) { KFileItem item = m_model->fileItem(index); const KUrl& url = openItemAsFolderUrl(item); @@ -874,14 +870,10 @@ KItemListView* view = m_container->controller()->view(); const QSet visibleRolesSet = view->visibleRoles().toSet(); - bool nepomukRunning = false; bool indexingEnabled = false; -#ifdef HAVE_NEPOMUK - nepomukRunning = (Nepomuk2::ResourceManager::instance()->initialized()); - if (nepomukRunning) { - KConfig config("nepomukserverrc"); - indexingEnabled = config.group("Service-nepomukfileindexer").readEntry("autostart", true); - } +#ifdef HAVE_BALOO + Baloo::IndexerConfig config; + indexingEnabled = config.fileIndexingEnabled(); #endif QString groupName; @@ -912,8 +904,8 @@ action->setChecked(visibleRolesSet.contains(info.role)); action->setData(info.role); - const bool enable = (!info.requiresNepomuk && !info.requiresIndexer) || - (info.requiresNepomuk && nepomukRunning) || + const bool enable = (!info.requiresBaloo && !info.requiresIndexer) || + (info.requiresBaloo) || (info.requiresIndexer && indexingEnabled); action->setEnabled(enable); } @@ -1054,6 +1046,7 @@ if (op && destUrl == url()) { // Mark the dropped urls as selected. m_clearSelectionBeforeSelectingNewItems = true; + m_markFirstNewlySelectedItemAsCurrent = true; connect(op, SIGNAL(aboutToCreate(KUrl::List)), this, SLOT(slotAboutToCreate(KUrl::List))); } @@ -1078,17 +1071,15 @@ void DolphinView::slotMouseButtonPressed(int itemIndex, Qt::MouseButtons buttons) { + Q_UNUSED(itemIndex); + hideToolTip(); - if (itemIndex < 0) { - // Trigger the history navigation only when clicking on the viewport: - // Above an item the XButtons provide a simple way to select items in - // the singleClick mode. - if (buttons & Qt::XButton1) { - emit goBackRequested(); - } else if (buttons & Qt::XButton2) { - emit goForwardRequested(); - } + // TODO: Qt5: Replace Qt::XButton1 by Qt::BackButton and Qt::XButton2 by Qt::ForwardButton + if (buttons & Qt::XButton1) { + emit goBackRequested(); + } else if (buttons & Qt::XButton2) { + emit goForwardRequested(); } } @@ -1103,7 +1094,7 @@ } } -void DolphinView::slotSelectionChanged(const QSet& current, const QSet& previous) +void DolphinView::slotSelectionChanged(const KItemSet& current, const KItemSet& previous) { const int currentCount = current.count(); const int previousCount = previous.count(); @@ -1322,7 +1313,7 @@ m_clearSelectionBeforeSelectingNewItems = false; } - QSet selectedItems = selectionManager->selectedItems(); + KItemSet selectedItems = selectionManager->selectedItems(); QList::iterator it = m_selectedUrls.begin(); while (it != m_selectedUrls.end()) { @@ -1492,7 +1483,9 @@ } KonqOperations* op = KonqOperations::renameV2(this, oldUrl, newName); - if (op) { + if (op && !newNameExistsAlready) { + // Only connect the renamingFailed signal if there is no item with the new name + // in the model yet, see bug 328262. connect(op, SIGNAL(renamingFailed(KUrl,KUrl)), SLOT(slotRenamingFailed(KUrl,KUrl))); } } @@ -1658,7 +1651,7 @@ QMimeData* DolphinView::selectionMimeData() const { const KItemListSelectionManager* selectionManager = m_container->controller()->selectionManager(); - const QSet selectedIndexes = selectionManager->selectedItems(); + const KItemSet selectedIndexes = selectionManager->selectedItems(); return m_model->createMimeData(selectedIndexes); } @@ -1666,13 +1659,18 @@ void DolphinView::updateWritableState() { const bool wasFolderWritable = m_isFolderWritable; - m_isFolderWritable = true; + m_isFolderWritable = false; - const KFileItem item = m_model->rootItem(); - if (!item.isNull()) { - KFileItemListProperties capabilities(KFileItemList() << item); - m_isFolderWritable = capabilities.supportsWriting(); + KFileItem item = m_model->rootItem(); + if (item.isNull()) { + // Try to find out if the URL is writable even if the "root item" is + // null, see https://bugs.kde.org/show_bug.cgi?id=330001 + item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, url(), true); } + + KFileItemListProperties capabilities(KFileItemList() << item); + m_isFolderWritable = capabilities.supportsWriting(); + if (m_isFolderWritable != wasFolderWritable) { emit writeStateChanged(m_isFolderWritable); } diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/views/dolphinview.h netrunner-desktop-containment-4.13.0/dolphin/src/views/dolphinview.h --- netrunner-desktop-containment-4.11.1/dolphin/src/views/dolphinview.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/views/dolphinview.h 2014-05-26 15:31:22.000000000 +0000 @@ -21,7 +21,7 @@ #ifndef DOLPHINVIEW_H #define DOLPHINVIEW_H -#include +#include #include "libdolphin_export.h" @@ -34,7 +34,6 @@ #include #include #include -#include #include typedef KIO::FileUndoManager::CommandType CommandType; @@ -45,6 +44,7 @@ class KFileItemModel; class KItemListContainer; class KItemModelBase; +class KItemSet; class KUrl; class ToolTipManager; class VersionControlObserver; @@ -217,7 +217,6 @@ QList visibleRoles() const; void reload(); - void stopLoading(); /** * Refreshes the view to get synchronized with the settings (e.g. icons size, @@ -369,6 +368,8 @@ */ void pasteIntoFolder(); + void stopLoading(); + /** Activates the view if the item list container gets focus. */ virtual bool eventFilter(QObject* watched, QEvent* event); @@ -562,7 +563,7 @@ void activate(); void slotItemActivated(int index); - void slotItemsActivated(const QSet& indexes); + void slotItemsActivated(const KItemSet& indexes); void slotItemMiddleClicked(int index); void slotItemContextMenuRequested(int index, const QPointF& pos); void slotViewContextMenuRequested(const QPointF& pos); @@ -586,7 +587,7 @@ * the signal is emitted only after no selection change has been done * within a small delay. */ - void slotSelectionChanged(const QSet& current, const QSet& previous); + void slotSelectionChanged(const KItemSet& current, const KItemSet& previous); /** * Is called by emitDelayedSelectionChangedSignal() and emits the diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/views/tooltips/filemetadatatooltip.cpp netrunner-desktop-containment-4.13.0/dolphin/src/views/tooltips/filemetadatatooltip.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/views/tooltips/filemetadatatooltip.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/views/tooltips/filemetadatatooltip.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -24,16 +24,20 @@ #include #include #include +#include #include #include #include #include +#include +#include +#include -#ifndef HAVE_NEPOMUK +#ifndef HAVE_BALOO #include #else -#include +#include #endif // For the blurred tooltip background @@ -56,15 +60,20 @@ m_name = new QLabel(this); m_name->setForegroundRole(QPalette::ToolTipText); m_name->setTextFormat(Qt::PlainText); + m_name->setAlignment(Qt::AlignHCenter); + QFont font = m_name->font(); font.setBold(true); m_name->setFont(font); + QFontMetrics fontMetrics(font); + m_name->setMaximumWidth(fontMetrics.averageCharWidth() * 40); + // Create widget for the meta data -#ifndef HAVE_NEPOMUK +#ifndef HAVE_BALOO m_fileMetaDataWidget = new KFileMetaDataWidget(this); #else - m_fileMetaDataWidget = new Nepomuk2::FileMetaDataWidget(this); + m_fileMetaDataWidget = new Baloo::FileMetaDataWidget(this); #endif m_fileMetaDataWidget->setForegroundRole(QPalette::ToolTipText); m_fileMetaDataWidget->setReadOnly(true); @@ -108,7 +117,33 @@ void FileMetaDataToolTip::setName(const QString& name) { - m_name->setText(name); + QTextOption textOption; + textOption.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere); + + const QString processedName = Qt::mightBeRichText(name) ? name : KStringHandler::preProcessWrap(name); + + QTextLayout textLayout(processedName); + textLayout.setFont(m_name->font()); + textLayout.setTextOption(textOption); + + QString wrappedText; + wrappedText.reserve(processedName.length()); + + // wrap the text to fit into the maximum width of m_name + textLayout.beginLayout(); + QTextLine line = textLayout.createLine(); + while (line.isValid()) { + line.setLineWidth(m_name->maximumWidth()); + wrappedText += processedName.mid(line.textStart(), line.textLength()); + + line = textLayout.createLine(); + if (line.isValid()) { + wrappedText += QChar::LineSeparator; + } + } + textLayout.endLayout(); + + m_name->setText(wrappedText); } QString FileMetaDataToolTip::name() const diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/views/tooltips/filemetadatatooltip.h netrunner-desktop-containment-4.13.0/dolphin/src/views/tooltips/filemetadatatooltip.h --- netrunner-desktop-containment-4.11.1/dolphin/src/views/tooltips/filemetadatatooltip.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/views/tooltips/filemetadatatooltip.h 2014-05-26 15:31:22.000000000 +0000 @@ -23,15 +23,15 @@ #define FILEMETADATATOOLTIP_H #include -#include "config-nepomuk.h" +#include "config-baloo.h" class KFileItemList; class QLabel; -#ifndef HAVE_NEPOMUK +#ifndef HAVE_BALOO class KFileMetaDataWidget; #else -namespace Nepomuk2 { +namespace Baloo { class FileMetaDataWidget; } #endif @@ -76,10 +76,10 @@ private: QLabel* m_preview; QLabel* m_name; -#ifndef HAVE_NEPOMUK +#ifndef HAVE_BALOO KFileMetaDataWidget* m_fileMetaDataWidget; #else - Nepomuk2::FileMetaDataWidget* m_fileMetaDataWidget; + Baloo::FileMetaDataWidget* m_fileMetaDataWidget; #endif }; diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/views/versioncontrol/fileviewversioncontrolplugin.desktop netrunner-desktop-containment-4.13.0/dolphin/src/views/versioncontrol/fileviewversioncontrolplugin.desktop --- netrunner-desktop-containment-4.11.1/dolphin/src/views/versioncontrol/fileviewversioncontrolplugin.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/views/versioncontrol/fileviewversioncontrolplugin.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -31,7 +31,7 @@ Comment[is]=Útgáfustýringar-íforrit fyrir skráasýnir Comment[it]=Estensione di controllo delle versioni per le viste dei file Comment[ja]=ファイルビューのためのバージョン管理プラグイン -Comment[kk]=Файл көрнісіне арналған Нұсқаларды басқару плагины +Comment[kk]=Файл көрнісіне арналған Нұсқаларды басқару плагині Comment[km]=កំណែ​កម្មវិធី​ជំនួយ​វត្ថុ​បញ្ជា​​សម្រាប់​មើល​ឯកសារ Comment[kn]=ಕಡತ ನೋಟಗಳಿಗಾಗಿ ಆವೃತ್ತಿ ನಿಯಂತ್ರಣಾ ವ್ಯವಸ್ಥೆ ಪ್ಲಗ್ಗಿನ್ (ಮಿಳಿತಾನ್ವಯ) Comment[ko]=파일 보기를 위한 버전 관리 플러그인 diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/views/versioncontrol/updateitemstatesthread.cpp netrunner-desktop-containment-4.13.0/dolphin/src/views/versioncontrol/updateitemstatesthread.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/views/versioncontrol/updateitemstatesthread.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/views/versioncontrol/updateitemstatesthread.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -24,11 +24,10 @@ #include UpdateItemStatesThread::UpdateItemStatesThread(KVersionControlPlugin* plugin, - const QList& itemStates) : + const QMap >& itemStates) : QThread(), m_globalPluginMutex(0), m_plugin(plugin), - m_retrievedItems(false), m_itemStates(itemStates) { // Several threads may share one instance of a plugin. A global @@ -47,48 +46,33 @@ Q_ASSERT(!m_itemStates.isEmpty()); Q_ASSERT(m_plugin); - const QString directory = m_itemStates.first().item.url().directory(KUrl::AppendTrailingSlash); - m_retrievedItems = false; - QMutexLocker pluginLocker(m_globalPluginMutex); - if (m_plugin->beginRetrieval(directory)) { - const int count = m_itemStates.count(); - - KVersionControlPlugin2* pluginV2 = qobject_cast(m_plugin); - if (pluginV2) { - for (int i = 0; i < count; ++i) { - m_itemStates[i].version = pluginV2->itemVersion(m_itemStates[i].item); - } - } else { - for (int i = 0; i < count; ++i) { - const KVersionControlPlugin::VersionState state = m_plugin->versionState(m_itemStates[i].item); - m_itemStates[i].version = static_cast(state); + QMap >::iterator it = m_itemStates.begin(); + for (; it != m_itemStates.end(); ++it) { + if (m_plugin->beginRetrieval(it.key())) { + QVector& items = it.value(); + const int count = items.count(); + + KVersionControlPlugin2* pluginV2 = qobject_cast(m_plugin); + if (pluginV2) { + for (int i = 0; i < count; ++i) { + items[i].version = pluginV2->itemVersion(items[i].item); + } + } else { + for (int i = 0; i < count; ++i) { + const KVersionControlPlugin::VersionState state = m_plugin->versionState(items[i].item); + items[i].version = static_cast(state); + } } } m_plugin->endRetrieval(); - m_retrievedItems = true; } } -bool UpdateItemStatesThread::lockPlugin() -{ - return m_globalPluginMutex->tryLock(300); -} - -void UpdateItemStatesThread::unlockPlugin() -{ - m_globalPluginMutex->unlock(); -} - -QList UpdateItemStatesThread::itemStates() const +QMap > UpdateItemStatesThread::itemStates() const { return m_itemStates; } -bool UpdateItemStatesThread::retrievedItems() const -{ - return m_retrievedItems; -} - #include "updateitemstatesthread.moc" diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/views/versioncontrol/updateitemstatesthread.h netrunner-desktop-containment-4.13.0/dolphin/src/views/versioncontrol/updateitemstatesthread.h --- netrunner-desktop-containment-4.11.1/dolphin/src/views/versioncontrol/updateitemstatesthread.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/views/versioncontrol/updateitemstatesthread.h 2014-05-26 15:31:22.000000000 +0000 @@ -47,25 +47,10 @@ * @param itemStates List of items, where the states get updated. */ UpdateItemStatesThread(KVersionControlPlugin* plugin, - const QList& itemStates); + const QMap >& itemStates); virtual ~UpdateItemStatesThread(); - /** - * Whenever the plugin is accessed by the thread creator, lockPlugin() must - * be invoked. True is returned, if the plugin could be locked within 300 - * milliseconds. - */ - bool lockPlugin(); - - /** - * Must be invoked if lockPlugin() returned true and plugin has been accessed - * by the thread creator. - */ - void unlockPlugin(); - - QList itemStates() const; - - bool retrievedItems() const; + QMap > itemStates() const; protected: virtual void run(); @@ -74,8 +59,7 @@ QMutex* m_globalPluginMutex; // Protects the m_plugin globally KVersionControlPlugin* m_plugin; - bool m_retrievedItems; - QList m_itemStates; + QMap > m_itemStates; }; #endif // UPDATEITEMSTATESTHREAD_H diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/views/versioncontrol/versioncontrolobserver.cpp netrunner-desktop-containment-4.13.0/dolphin/src/views/versioncontrol/versioncontrolobserver.cpp --- netrunner-desktop-containment-4.11.1/dolphin/src/views/versioncontrol/versioncontrolobserver.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/views/versioncontrol/versioncontrolobserver.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -198,17 +198,16 @@ return; } - if (!thread->retrievedItems()) { - // Ignore m_silentUpdate for an error message - emit errorMessage(i18nc("@info:status", "Update of version information failed.")); - return; - } - - const QList itemStates = thread->itemStates(); - foreach (const ItemState& itemState, itemStates) { - QHash values; - values.insert("version", QVariant(itemState.version)); - m_model->setData(itemState.index, values); + const QMap >& itemStates = thread->itemStates(); + QMap >::const_iterator it = itemStates.constBegin(); + for (; it != itemStates.constEnd(); ++it) { + const QVector& items = it.value(); + + foreach (const ItemState& item, items) { + QHash values; + values.insert("version", QVariant(item.version)); + m_model->setData(m_model->index(item.item), values); + } } if (!m_silentUpdate) { @@ -233,18 +232,9 @@ m_pendingItemStatesUpdate = true; return; } - QList itemStates; - const int itemCount = m_model->count(); - itemStates.reserve(itemCount); - for (int i = 0; i < itemCount; ++i) { - ItemState itemState; - itemState.index = i; - itemState.item = m_model->fileItem(i); - itemState.version = KVersionControlPlugin2::UnversionedVersion; - - itemStates.append(itemState); - } + QMap > itemStates; + createItemStatesList(itemStates); if (!itemStates.isEmpty()) { if (!m_silentUpdate) { @@ -260,6 +250,41 @@ } } +int VersionControlObserver::createItemStatesList(QMap >& itemStates, + const int firstIndex) +{ + const int itemCount = m_model->count(); + const int currentExpansionLevel = m_model->expandedParentsCount(firstIndex); + + QVector items; + items.reserve(itemCount - firstIndex); + + int index; + for (index = firstIndex; index < itemCount; ++index) { + const int expansionLevel = m_model->expandedParentsCount(index); + + if (expansionLevel == currentExpansionLevel) { + ItemState itemState; + itemState.item = m_model->fileItem(index); + itemState.version = KVersionControlPlugin2::UnversionedVersion; + + items.append(itemState); + } else if (expansionLevel > currentExpansionLevel) { + // Sub folder + index += createItemStatesList(itemStates, index) - 1; + } else { + break; + } + } + + if (items.count() > 0) { + const KUrl& url = items.first().item.url(); + itemStates.insert(url.directory(KUrl::AppendTrailingSlash), items); + } + + return index - firstIndex; // number of processed items +} + KVersionControlPlugin* VersionControlObserver::searchPlugin(const KUrl& directory) const { static bool pluginsAvailable = true; @@ -291,11 +316,18 @@ } } + // We use the number of upUrl() calls to find the best matching plugin + // for the given directory. The smaller value, the better it is (0 is best). + KVersionControlPlugin* bestPlugin = 0; + int bestScore = INT_MAX; + // Verify whether the current directory contains revision information // like .svn, .git, ... foreach (KVersionControlPlugin* plugin, plugins) { const QString fileName = directory.path(KUrl::AddTrailingSlash) + plugin->fileName(); if (QFile::exists(fileName)) { + // The score of this plugin is 0 (best), so we can just return this plugin, + // instead of going through the plugin scoring procedure, we can't find a better one ;) return plugin; } @@ -308,18 +340,24 @@ if (m_versionedDirectory) { KUrl dirUrl(directory); KUrl upUrl = dirUrl.upUrl(); - while (upUrl != dirUrl) { + int upUrlCounter = 1; + while ((upUrlCounter < bestScore) && (upUrl != dirUrl)) { const QString fileName = dirUrl.path(KUrl::AddTrailingSlash) + plugin->fileName(); if (QFile::exists(fileName)) { - return plugin; + if (upUrlCounter < bestScore) { + bestPlugin = plugin; + bestScore = upUrlCounter; + } + break; } dirUrl = upUrl; upUrl = dirUrl.upUrl(); + ++upUrlCounter; } } } - return 0; + return bestPlugin; } bool VersionControlObserver::isVersioned() const diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/views/versioncontrol/versioncontrolobserver.h netrunner-desktop-containment-4.13.0/dolphin/src/views/versioncontrol/versioncontrolobserver.h --- netrunner-desktop-containment-4.11.1/dolphin/src/views/versioncontrol/versioncontrolobserver.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/views/versioncontrol/versioncontrolobserver.h 2014-05-26 15:31:22.000000000 +0000 @@ -102,7 +102,6 @@ private: struct ItemState { - int index; KFileItem item; KVersionControlPlugin2::ItemVersion version; }; @@ -110,6 +109,22 @@ void updateItemStates(); /** + * It creates a item state list for every expanded directory and stores + * this list together with the directory url in the \a itemStates map. + * + * @itemStates A map of item state lists for every expanded directory + * and its items, where the "key" is the directory url and + * the "value" is a list of ItemStates for every item + * within this directory. + * @firstIndex The index to start the processing from, this is needed + * because this function is recursively called. + * + * @return The number of (recursive) processed items. + */ + int createItemStatesList(QMap >& itemStates, + const int firstIndex = 0); + + /** * Returns a matching plugin for the given directory. * 0 is returned, if no matching plugin has been found. */ diff -Nru netrunner-desktop-containment-4.11.1/dolphin/src/views/viewproperties.h netrunner-desktop-containment-4.13.0/dolphin/src/views/viewproperties.h --- netrunner-desktop-containment-4.11.1/dolphin/src/views/viewproperties.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/dolphin/src/views/viewproperties.h 2014-05-26 15:31:22.000000000 +0000 @@ -160,7 +160,7 @@ /** * @return A hash-value for an URL that can be used as directory name. - * Is used to be able to remember view-properties for long nepomuksearch-URLs. + * Is used to be able to remember view-properties for long baloo-URLs. */ static QString directoryHashForUrl(const KUrl& url); diff -Nru netrunner-desktop-containment-4.11.1/kdepasswd/kcm/chfnprocess.cpp netrunner-desktop-containment-4.13.0/kdepasswd/kcm/chfnprocess.cpp --- netrunner-desktop-containment-4.11.1/kdepasswd/kcm/chfnprocess.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/kdepasswd/kcm/chfnprocess.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -86,7 +86,7 @@ status=0; break; } - else if ( line.contains( "Password error" ) || line.contains("Incorrect password") ) + else if ( line.contains( "Password error" ) || line.contains("Incorrect password") || line.contains("Authentication failure") ) { status=PasswordError; break; diff -Nru netrunner-desktop-containment-4.11.1/kdepasswd/kcm/kcm_useraccount.desktop netrunner-desktop-containment-4.13.0/kdepasswd/kcm/kcm_useraccount.desktop --- netrunner-desktop-containment-4.11.1/kdepasswd/kcm/kcm_useraccount.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/kdepasswd/kcm/kcm_useraccount.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -43,7 +43,7 @@ Name[ga]=Focal Faire agus Cuntas Úsáideora Name[gl]=Contrasinal e conta de usuario Name[gu]=પાસવર્ડ અને વપરાશકર્તા ખાતું -Name[he]=סיסמא וחשבון משתמש +Name[he]=סיסמה וחשבון משתמש Name[hi]=पासवर्ड तथा उपयोक्ता खाता Name[hne]=पासवर्ड अउ कमइया खाता Name[hr]=Zaporka i korisnički račun @@ -103,6 +103,7 @@ Name[zh_CN]=密码和用户信息 Name[zh_TW]=密碼與帳號資訊 X-KDE-Keywords=password;email;name;organization;realname;login image;face; echo mode; +X-KDE-Keywords[bg]=парола;е-поща;име;организация;лице;аватар;password;email;name;organization;realname;login image;face; echo mode; X-KDE-Keywords[bs]=password;email;name;organization;realname;login image;face; echo mode; X-KDE-Keywords[ca]=contrasenya;correu electrònic;nom;organització;nom real;imatge d'inici de sessió;cara;mode d'eco; X-KDE-Keywords[ca@valencia]=contrasenya;correu electrònic;nom;organització;nom real;imatge d'inici de sessió;cara;mode d'eco; @@ -115,6 +116,7 @@ X-KDE-Keywords[fr]=mot de passe ; courrier électronique ; nom ; organisation ; nom réel ; image de connexion ; visage ; mode rappel ; X-KDE-Keywords[ga]=focal faire;ríomhphost;ainm;eagras;fíorainm;íomhá logála isteach;aghaidh;mód macalla; X-KDE-Keywords[gl]=contrasinal;correo electrónico;email;organización;nome real;cara; +X-KDE-Keywords[he]=password;email;name;organization;realname;login image;face; echo mode;ססמה;דוא"ל;דואל;שם;ארגון;חיבור;פנים;פרצוף;תמונה X-KDE-Keywords[hu]=jelszó;e-mail;név;szervezet;valódi név;bejelentkezési kép;arckép;visszajelzési mód; X-KDE-Keywords[ia]=contrasigno;e-posta;nomine;organization;ver nomine;image de accesso;facie;modo echo; X-KDE-Keywords[it]=password;email;posta elettronica;nome;organizzazione;nome vero;immagine di login;face;modalità echo diff -Nru netrunner-desktop-containment-4.11.1/kdepasswd/kdepasswd.desktop netrunner-desktop-containment-4.13.0/kdepasswd/kdepasswd.desktop --- netrunner-desktop-containment-4.11.1/kdepasswd/kdepasswd.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/kdepasswd/kdepasswd.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -37,7 +37,7 @@ Name[ga]=Athraigh Focal Faire Name[gl]=Mudar o contrasinal Name[gu]=પાસવર્ડ બદલો -Name[he]=שינוי סיסמא +Name[he]=שינוי סיסמה Name[hi]=पासवर्ड बदलें Name[hne]=पासवर्ड बदलव Name[hr]=Promjena lozinke @@ -88,7 +88,7 @@ Name[tg]=Ивази парол Name[th]=เปลี่ยนรหัสผ่าน Name[tr]=Parola Değiştir -Name[ug]=ئىم ئۆزگەرت +Name[ug]=ئىم ئۆزگەرتىش Name[uk]=Зміна пароля Name[uz]=Maxfiy soʻzni oʻzgartirish Name[uz@cyrillic]=Махфий сўзни ўзгартириш diff -Nru netrunner-desktop-containment-4.11.1/kdialog/kdialog.cpp netrunner-desktop-containment-4.13.0/kdialog/kdialog.cpp --- netrunner-desktop-containment-4.11.1/kdialog/kdialog.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/kdialog/kdialog.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -278,10 +278,16 @@ option = "sorry"; type = KMessageBox::Sorry; } + else if (args->isSet("detailedsorry")) { + option = "detailedsorry"; + } else if (args->isSet("error")) { option = "error"; type = KMessageBox::Error; } + else if (args->isSet("detailederror")) { + option = "detailederror"; + } else if (args->isSet("msgbox")) { option = "msgbox"; type = KMessageBox::Information; @@ -305,13 +311,22 @@ else qDebug( "Incorrect --dontagain!" ); } - int ret; + int ret = 0; QString text = Widgets::parseString(args->getOption(option)); + QString details; + if (args->count() == 1) { + details = Widgets::parseString(args->arg(0)); + } + if ( type == KMessageBox::WarningContinueCancel ) { ret = KMessageBox::messageBox( 0, type, text, title, continueButton, noButton, cancelButton, dontagain ); + } else if (option == "detailedsorry") { + KMessageBox::detailedSorry( 0, text, details, title ); + } else if (option == "detailederror") { + KMessageBox::detailedError( 0, text, details, title ); } else { ret = KMessageBox::messageBox( 0, type, text, title, yesButton, noButton, cancelButton, dontagain ); @@ -852,7 +867,9 @@ options.add("cancel-label ", ki18n("Use text as Cancel button label")); options.add("continue-label ", ki18n("Use text as Continue button label")); options.add("sorry ", ki18n("'Sorry' message box")); + options.add("detailedsorry
", ki18n("'Sorry' message box with expandable Details field")); options.add("error ", ki18n("'Error' message box")); + options.add("detailederror
", ki18n("'Error' message box with expandable Details field")); options.add("msgbox ", ki18n("Message Box dialog")); options.add("inputbox ", ki18n("Input Box dialog")); options.add("password ", ki18n("Password dialog")); diff -Nru netrunner-desktop-containment-4.11.1/keditbookmarks/kbookmarkmodel/commands.cpp netrunner-desktop-containment-4.13.0/keditbookmarks/kbookmarkmodel/commands.cpp --- netrunner-desktop-containment-4.11.1/keditbookmarks/kbookmarkmodel/commands.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/keditbookmarks/kbookmarkmodel/commands.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -499,54 +499,40 @@ QString currentAddress = addr; QDomDocument doc; const KBookmark::List bookmarks = KBookmark::List::fromMimeData(data, doc); - KBookmark::List::const_iterator it, end; - end = bookmarks.constEnd(); - - for (it = bookmarks.constBegin(); it != end; ++it) - { - new CreateCommand(model, currentAddress, (*it), QString(), mcmd); + foreach (const KBookmark &bk, bookmarks) { + new CreateCommand(model, currentAddress, bk, QString(), mcmd); currentAddress = KBookmark::nextAddress(currentAddress); } return mcmd; } -//FIXME copy=true needed? what is the difference with insertMimeSource KEBMacroCommand* CmdGen::itemsMoved(KBookmarkModel* model, const QList & items, - const QString &newAddress, bool copy) { + const QString &newAddress, bool copy) +{ + Q_ASSERT(!copy); // always called for a move, never for a copy (that's what insertMimeSource is about) + Q_UNUSED(copy); // TODO: remove + KEBMacroCommand *mcmd = new KEBMacroCommand(copy ? i18nc("(qtundo-format)", "Copy Items") : i18nc("(qtundo-format)", "Move Items")); - - QList::const_iterator it, end; - it = items.constBegin(); - end = items.constEnd(); - QString bkInsertAddr = newAddress; - for (; it != end; ++it) { - if (copy) { - CreateCommand *cmd = new CreateCommand(model, - bkInsertAddr, - KBookmark((*it).internalElement() - .cloneNode(true).toElement()), - (*it).text(), mcmd); - - //cmd->redo(); - - bkInsertAddr = cmd->finalAddress(); // TODO is this correct without the redo()? - - } else /* if (move) */ { - const QString oldAddress = (*it).address(); - if (bkInsertAddr.startsWith(oldAddress)) - continue; // trying to insert a parent into one of its children, ignore :) - - MoveCommand *cmd = new MoveCommand(model, oldAddress, bkInsertAddr, - (*it).text(), mcmd); - //cmd->redo(); + foreach (const KBookmark &bk, items) { + new CreateCommand(model, bkInsertAddr, + KBookmark(bk.internalElement().cloneNode(true).toElement()), + bk.text(), mcmd); + bkInsertAddr = KBookmark::nextAddress(bkInsertAddr); + } - bkInsertAddr = cmd->finalAddress(); // TODO is this correct without the redo()? - } + // Do the copying, and get the updated addresses of the bookmarks to remove. + mcmd->redo(); + QStringList addresses; + foreach (const KBookmark &bk, items) { + addresses.append(bk.address()); + } + mcmd->undo(); - bkInsertAddr = KBookmark::nextAddress(bkInsertAddr); + foreach (const QString &address, addresses) { + new DeleteCommand(model, address, false, mcmd); } return mcmd; diff -Nru netrunner-desktop-containment-4.11.1/keditbookmarks/kbookmarkmodel/commands.h netrunner-desktop-containment-4.13.0/keditbookmarks/kbookmarkmodel/commands.h --- netrunner-desktop-containment-4.11.1/keditbookmarks/kbookmarkmodel/commands.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/keditbookmarks/kbookmarkmodel/commands.h 2014-05-26 15:31:22.000000000 +0000 @@ -153,6 +153,7 @@ public: static KEBMacroCommand* setAsToolbar(KBookmarkModel* model, const KBookmark &bk); static KEBMacroCommand* insertMimeSource(KBookmarkModel* model, const QString &cmdName, const QMimeData *data, const QString &addr); + // TODO remove "bool copy" static KEBMacroCommand* itemsMoved(KBookmarkModel* model, const QList & items, const QString &newAddress, bool copy); private: CmdGen() {} diff -Nru netrunner-desktop-containment-4.11.1/keditbookmarks/kbookmarkmodel/tests/kbookmarkmodeltest.cpp netrunner-desktop-containment-4.13.0/keditbookmarks/kbookmarkmodel/tests/kbookmarkmodeltest.cpp --- netrunner-desktop-containment-4.11.1/keditbookmarks/kbookmarkmodel/tests/kbookmarkmodeltest.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/keditbookmarks/kbookmarkmodel/tests/kbookmarkmodeltest.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -166,15 +166,19 @@ QCOMPARE(BookmarkLister::addressList(m_bookmarkManager), QStringList() << "/0/" << "/0/0" << "/0/1" << "/1/"); QCOMPARE(m_model->rowCount(m_rootIndex), 2); - QModelIndex firstIndex = m_model->indexForBookmark(m_bookmarkManager->findByAddress("/0/0")); - kdeIndex = m_model->indexForBookmark(m_bookmarkManager->findByAddress("/0/1")); - mimeData = m_model->mimeData(QModelIndexList() << firstIndex << kdeIndex); - QModelIndex folder2Index = m_model->indexForBookmark(m_bookmarkManager->findByAddress("/1")); - ok = m_model->dropMimeData(mimeData, Qt::MoveAction, -1, 0, folder2Index); - QVERIFY(ok); + moveTwoBookmarks("/0/0", "/0/1", "/1"); QCOMPARE(BookmarkLister::addressList(m_bookmarkManager), QStringList() << "/0/" << "/1/" << "/1/0" << "/1/1"); QCOMPARE(BookmarkLister::urlList(m_bookmarkManager), QStringList() << kde << first); - delete mimeData; + + // Move bookmarks from /1 into subfolder /1/2 (which will become /1/0) + m_cmdHistory->addCommand(new CreateCommand(m_model, "/1/2", "subfolder", "subfolder", true)); + QCOMPARE(BookmarkLister::addressList(m_bookmarkManager), QStringList() << "/0/" << "/1/" << "/1/0" << "/1/1" << "/1/2/"); + moveTwoBookmarks("/1/0", "/1/1", "/1/2"); + QCOMPARE(BookmarkLister::addressList(m_bookmarkManager), QStringList() << "/0/" << "/1/" << "/1/0/" << "/1/0/0" << "/1/0/1"); + + // Move them up again + moveTwoBookmarks("/1/0/0", "/1/0/1", "/1"); + QCOMPARE(BookmarkLister::addressList(m_bookmarkManager), QStringList() << "/0/" << "/1/" << "/1/0" << "/1/1" << "/1/2/"); undoAll(); } @@ -210,6 +214,16 @@ } private: + void moveTwoBookmarks(const QString &src1, const QString &src2, const QString &dest) + { + const QModelIndex firstIndex = m_model->indexForBookmark(m_bookmarkManager->findByAddress(src1)); + const QModelIndex secondIndex = m_model->indexForBookmark(m_bookmarkManager->findByAddress(src2)); + QMimeData *mimeData = m_model->mimeData(QModelIndexList() << firstIndex << secondIndex); + QModelIndex folder2Index = m_model->indexForBookmark(m_bookmarkManager->findByAddress(dest)); + QVERIFY(m_model->dropMimeData(mimeData, Qt::MoveAction, -1, 0, folder2Index)); + delete mimeData; + } + void undoAll() { QAction* undoAction = m_collection.action(KStandardAction::name(KStandardAction::Undo)); diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/babelfish/plugin_translator.desktop netrunner-desktop-containment-4.13.0/konq-plugins/babelfish/plugin_translator.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/babelfish/plugin_translator.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/babelfish/plugin_translator.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -74,28 +74,35 @@ Name[zh_CN]=翻译 Name[zh_TW]=翻譯 Comment=Language translation for the current page using Google +Comment[bg]=Превеждане на текущата страница с помощта на Google Comment[bs]=Prevod trenutne stranicu koristeći Gogle Comment[ca]=Traducció d'idioma per a la pàgina actual usant el Google +Comment[ca@valencia]=Traducció d'idioma per a la pàgina actual usant el Google Comment[cs]=Překlad aktuální stránky do vybraného jazyka pomocí Google Comment[da]=Sprogoversættelse af den aktuelle side med Google Comment[de]=Übersetzt die Sprache der aktuellen Webseite mit Hilfe von Google Comment[el]=Μετάφραση της τρέχουσας σελίδας με χρήση Google Comment[es]=Traducción de idioma para la página actual utilizando Google +Comment[et]=Aktiivse lehekülje tõlkimine Google'i abil Comment[fi]=Nykyisen sivun kääntäminen toiselle kielelle käyttäen Googlea Comment[fr]=Traduction de la langue de la page actuelle à l'aide de Google Comment[gl]=Tradución da páxina actual usando Google +Comment[he]=תרגום שפת הדף הנוכחי באמצעות Google Comment[hu]=Az aktuális oldal fordítása a Google használatával Comment[ia]=Traduction de linguage pro le pagina currente usante Google +Comment[is]=Þýða tungumál síðunnar með Google Comment[it]=Traduzione della pagina corrente usando Google Comment[kk]=Google-дің көмегімен ашылған бетті басқа тілге аудару Comment[ko]=Google을 사용하여 현재 페이지의 언어를 번역하기 Comment[lt]=Šio puslapio kalbos vertimas naudojant Google Comment[nb]=Språkoversettelse for gjeldende side, ved bruk av Google +Comment[nds]=Översetten vun de aktuelle Nettsiet mit Google Comment[nl]=Vertaalt de huidige webpagina met behulp van Google Comment[pa]=ਮੌਜੂਦਾ ਪੇਜ਼ ਦਾ ਗੂਗਲ ਰਾਹੀਂ ਭਾਸ਼ਾ ਅਨੁਵਾਦ -Comment[pl]=Tłumaczenie dla bieżącej strony przy użyciu Google +Comment[pl]=Tłumaczenia dla bieżącej strony przy użyciu Google Comment[pt]=Traduzir a língua da página actual com o Google Comment[pt_BR]=Tradução da página atual usando o Google +Comment[ro]=Traducerea lingvistică pentru pagina curentă folosind Google Comment[ru]=Перевод текущей страницы с помощью Google Comment[sk]=Preklad aktuálnej stránky pomocou Google Comment[sl]=Prevod trenutne strani z uporabo Googla @@ -107,6 +114,7 @@ Comment[tr]=Yürürlükteki sayfayı Google ile çevir Comment[uk]=Переклад поточної сторінки за допомогою Google Comment[x-test]=xxLanguage translation for the current page using Googlexx +Comment[zh_CN]=使用 Google 对当前页面的翻译 Comment[zh_TW]=使用 Google 對目前頁面做翻譯 Icon=babelfish X-KDE-ParentApp=konqueror diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/dirfilter/dirfilterplugin.desktop netrunner-desktop-containment-4.13.0/konq-plugins/dirfilter/dirfilterplugin.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/dirfilter/dirfilterplugin.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/dirfilter/dirfilterplugin.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -28,7 +28,7 @@ Name[fr]=Filtre de dossiers Name[ga]=Scagaire Comhadlainne Name[gl]=Filtraxe de cartafoles -Name[he]=מנטר תיקייה +Name[he]=מסנן תיקייה Name[hne]=डिरेक्टरी फिल्टर Name[hr]=Filtar direktorija Name[hu]=Könyvtárszűrő diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/imagerotation/imageconverter.desktop netrunner-desktop-containment-4.13.0/konq-plugins/imagerotation/imageconverter.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/imagerotation/imageconverter.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/imagerotation/imageconverter.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -7,7 +7,7 @@ X-KDE-Submenu=Convert To X-KDE-Submenu[ar]=حول إلى X-KDE-Submenu[be]=Канвертаваць у -X-KDE-Submenu[bg]=Конвертиране към +X-KDE-Submenu[bg]=Преобразуване в X-KDE-Submenu[bs]=Pretvori u X-KDE-Submenu[ca]=Converteix a X-KDE-Submenu[ca@valencia]=Converteix a @@ -24,7 +24,7 @@ X-KDE-Submenu[fr]=Convertir en X-KDE-Submenu[ga]=Tiontaigh Go X-KDE-Submenu[gl]=Converter en -X-KDE-Submenu[he]=המר ל־ +X-KDE-Submenu[he]=המר אל X-KDE-Submenu[hne]=ये मां बदलव X-KDE-Submenu[hr]=Pretvori u X-KDE-Submenu[hu]=Konvertálás diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/imagerotation/jpegorient.desktop netrunner-desktop-containment-4.13.0/konq-plugins/imagerotation/jpegorient.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/imagerotation/jpegorient.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/imagerotation/jpegorient.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -80,7 +80,7 @@ Name[ca@valencia]=Gira en sentit horari Name[cs]=Rotovat po směru hodin Name[da]=Rotér med uret -Name[de]=Rechts drehen +Name[de]=Mit dem Uhrzeigersinn drehen Name[el]=Περιστροφή με τη Φορά του Ρολογιού Name[en_GB]=Rotate Clockwise Name[es]=Girar en el sentido de las agujas del reloj @@ -147,7 +147,7 @@ Name[ca@valencia]=Gira en sentit antihorari Name[cs]=Rotovat proti směru hodin Name[da]=Rotér mod uret -Name[de]=Links drehen +Name[de]=Gegen den Uhrzeigersinn drehen Name[el]=Περιστροφή αριστερόστροφα Name[en_GB]=Rotate Anti-Clockwise Name[es]=Girar en sentido contrario a las agujas del reloj @@ -269,7 +269,7 @@ Name[tg]=Гардонидани амудӣ Name[th]=พลิกกลับทางแนวตั้ง Name[tr]=Dikey Olarak Çevir -Name[ug]=تىك يۆنىلىشتە چۆرگىلىتىش +Name[ug]=تىك ئايلاندۇر Name[uk]=Віддзеркалити вертикально Name[vi]=Lật dọc Name[wa]=Ratourner d' astampé @@ -339,7 +339,7 @@ Name[tg]=Гардонидани уфуқӣ Name[th]=พลิกกลับทางแนวนอน Name[tr]=Yatay Olarak Çevir -Name[ug]=توغرىسىغا چۆرگىلىتىش +Name[ug]=يانتۇ ئايلاندۇر Name[uk]=Віддзеркалити горизонтально Name[vi]=Lật ngang Name[wa]=Ratourner di coutchî diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-ada-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-ada-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-ada-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-ada-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-c++h-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-c++h-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-c++h-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-c++h-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-ch-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-ch-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-ch-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-ch-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-c-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-c-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-c-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-c-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-c++-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-c++-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-c++-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-c++-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-css-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-css-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-css-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-css-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-diff-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-diff-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-diff-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-diff-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-html-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-html-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-html-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-html-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-java-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-java-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-java-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-java-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-log-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-log-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-log-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-log-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-makefile-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-makefile-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-makefile-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-makefile-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-pas-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-pas-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-pas-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-pas-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-perl-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-perl-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-perl-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-perl-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-python-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-python-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-python-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-python-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-tcl-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-tcl-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-tcl-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-tcl-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-tex-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-tex-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-tex-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-tex-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-xml-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-xml-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-xml-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-xml-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-xslt-print.desktop netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-xslt-print.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/quickprint/text-xslt-print.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/quickprint/text-xslt-print.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -30,7 +30,7 @@ Name[et]=Trüki... Name[eu]=Inprimatu... Name[fa]=چاپ... -Name[fi]=Tulosta... +Name[fi]=Tulosta… Name[fr]=Imprimer... Name[fy]=Printsje... Name[ga]=Priontáil... diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/README netrunner-desktop-containment-4.13.0/konq-plugins/README --- netrunner-desktop-containment-4.11.1/konq-plugins/README 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/README 2014-05-26 15:31:22.000000000 +0000 @@ -4,7 +4,7 @@ babelfish ------------------- -This works on KHTMLPart/KWebKitPart. It uses BabelFish and other similar sites to +This works on KHTMLPart/KWebKitPart. It uses Google to translate the current page to whatever language you want (within reason). diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/rellinks/plugin_rellinks.desktop netrunner-desktop-containment-4.13.0/konq-plugins/rellinks/plugin_rellinks.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/rellinks/plugin_rellinks.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/rellinks/plugin_rellinks.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -29,6 +29,7 @@ Name[fr]=Relations entre documents Name[ga]=Gaolta Cáipéise Name[gl]=Relacións do documento +Name[he]=ייחוסים של מסמך Name[hne]=कागद सम्बन्ध Name[hr]=Relacije dokumenta Name[hu]=Dokumentumkapcsolatok @@ -88,6 +89,7 @@ Comment[fr]=Affiche les relations d'un document avec d'autres documents Comment[ga]=Taispeáin gaolta na cáipéise Comment[gl]=Mostra as relacións que ten este documento con outros +Comment[he]=מציג את הייחוסים של המסמך Comment[hne]=कागद के कागद सम्बन्ध प्रदर्सित करथे Comment[hr]=Prikazuje odnos dokumenta s drugim dokumentima Comment[hu]=Egy dokumentum dokumentumkapcsolatainak megjelenítése diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/searchbar/searchbar.desktop netrunner-desktop-containment-4.13.0/konq-plugins/searchbar/searchbar.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/searchbar/searchbar.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/searchbar/searchbar.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -84,7 +84,7 @@ Comment[de]=Zeigt ein Eingabefeld für direkten Zugriff auf Suchmaschinen wie Google. Comment[el]=Σας παρουσιάζει ένα πεδίο κειμένου για γρήγορη πρόσβαση σε μηχανές αναζήτησης όπως το Google. Comment[en_GB]=Provides a text box for easier access to search engines like Google. -Comment[es]=Proporciona un área de texto para facilitar el acceso a motores de búsqueda, como Google. +Comment[es]=Proporciona un área de texto para facilitar el acceso a motores de búsqueda,como Google. Comment[et]=Võimaldab kasutada tekstikasti kiireks ligipääsuks otsingumootoritele, nt. Google. Comment[eu]=Testu-koadro bat eskaintzen du Google bezalako bilaketa-motorrak errazago atzitzeko Comment[fi]=Hakurivi mahdollistaa Googlen tapaisten hakukoneiden helpon käytön. diff -Nru netrunner-desktop-containment-4.11.1/konq-plugins/webarchiver/plugin_webarchiver.desktop netrunner-desktop-containment-4.13.0/konq-plugins/webarchiver/plugin_webarchiver.desktop --- netrunner-desktop-containment-4.11.1/konq-plugins/webarchiver/plugin_webarchiver.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konq-plugins/webarchiver/plugin_webarchiver.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -28,6 +28,7 @@ Name[fr]=Archiveur Web Name[ga]=Cartlannaí Gréasáin Name[gl]=Arquivador web +Name[he]=ארכיוני רשת Name[hne]=वेब आर्काइवर Name[hr]=Arhiviranje weba Name[hu]=Webarchiváló diff -Nru netrunner-desktop-containment-4.11.1/konqueror/profile_filemanagement.desktop netrunner-desktop-containment-4.13.0/konqueror/profile_filemanagement.desktop --- netrunner-desktop-containment-4.11.1/konqueror/profile_filemanagement.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/profile_filemanagement.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -6,7 +6,7 @@ Name[ast]=Xestión de ficheros Name[be]=Кіраванне файламі Name[be@latin]=Kiravańnie fajłami -Name[bg]=File Management +Name[bg]=Управление на файл Name[bn]=ফাইল ব্যবস্থাপনা Name[bn_IN]=ফাইল পরিচালনা Name[br]=Mererezh ar restroù diff -Nru netrunner-desktop-containment-4.11.1/konqueror/profile_filepreview.desktop netrunner-desktop-containment-4.13.0/konqueror/profile_filepreview.desktop --- netrunner-desktop-containment-4.11.1/konqueror/profile_filepreview.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/profile_filepreview.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -13,7 +13,7 @@ Name[ast]=Vista previa de ficheru Name[be]=Прагляд файлаў Name[be@latin]=Padhlad fajłaŭ -Name[bg]=File Preview +Name[bg]=Преглед на файл Name[bn]=ফাইল প্রাকদর্শন Name[bn_IN]=ফাইলের পূর্বরূপ প্রদর্শন Name[br]=Rakgwel restr diff -Nru netrunner-desktop-containment-4.11.1/konqueror/profile_kde_devel.desktop netrunner-desktop-containment-4.13.0/konqueror/profile_kde_devel.desktop --- netrunner-desktop-containment-4.11.1/konqueror/profile_kde_devel.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/profile_kde_devel.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -7,7 +7,7 @@ Name[ast]=Desendolcu de KDE Name[be]=Распрацоўка KDE Name[be@latin]=Raspracoŭvańnie dla KDE -Name[bg]=KDE Development +Name[bg]=Разработване на KDE Name[bn]=কে.ডি.ই. ডেভেলপমেন্ট Name[bn_IN]=KDE ডিভেলপমেন্ট Name[bs]=Razvoj za KDE @@ -107,7 +107,7 @@ ViewT1_ServiceName=khtml ViewT1_ServiceType=text/html ViewT1_ToggleView=false -ViewT1_URL=http://doc.trolltech.com/ +ViewT1_URL=http://qt-project.org/doc/ ViewT2_LinkedView=false ViewT2_LockedLocation=false ViewT2_PassiveMode=false diff -Nru netrunner-desktop-containment-4.11.1/konqueror/profile_tabbedbrowsing.desktop netrunner-desktop-containment-4.13.0/konqueror/profile_tabbedbrowsing.desktop --- netrunner-desktop-containment-4.11.1/konqueror/profile_tabbedbrowsing.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/profile_tabbedbrowsing.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -7,7 +7,7 @@ Name[ast]=Navegación con llingüetes Name[be]=Вандроўка з укладкамі Name[be@latin]=Prahlad u kartkach -Name[bg]=Tabbed Browsing +Name[bg]=Работа с подпрозорци Name[bn]=ট্যাব সম্বলিত ব্রাউজিং Name[bn_IN]=ট্যাবসহ ব্রাউজ Name[br]=Furchal gant bevennigoù diff -Nru netrunner-desktop-containment-4.11.1/konqueror/profile_webbrowsing.desktop netrunner-desktop-containment-4.13.0/konqueror/profile_webbrowsing.desktop --- netrunner-desktop-containment-4.11.1/konqueror/profile_webbrowsing.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/profile_webbrowsing.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -6,7 +6,7 @@ Name[ast]=Navegación Web Name[be]=Вандроўка па Сеціве Name[be@latin]=Hartańnie sieciva -Name[bg]=Web Browsing +Name[bg]=Сърфиране в уеб Name[bn]=ওয়েব ব্রাউজিং Name[bn_IN]=ওয়েব ব্রাউজ Name[br]=Furchal ar Gwiad diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/ebrowsing/ebrowsing.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/ebrowsing/ebrowsing.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/ebrowsing/ebrowsing.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/ebrowsing/ebrowsing.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -28,7 +28,7 @@ Name[csb]=Sécowé skrodzënë Name[cy]=Byr-lwybrau Gwe Name[da]=Webgenveje -Name[de]=Web-Kürzel +Name[de]=Webkürzel Name[el]=Συντομεύσεις ιστού Name[en_GB]=Web Shortcuts Name[eo]=TTT klavokombinoj @@ -196,6 +196,7 @@ Comment[zh_TW]=設定增強式瀏覽 X-KDE-Keywords=Enhanced Browsing,Browsing,WWW,Internet,Internet Filters,Network,Search Engines,Shortcuts +X-KDE-Keywords[bg]=Сърфиране,Уеб,Интернет,Мрежа,Търсене,Търсачка,Enhanced Browsing,Browsing,WWW,Internet,Internet Filters,Network,Search Engines,Shortcuts X-KDE-Keywords[bs]=Enhanced Browsing,Browsing,WWW,Internet,Internet Filters,Network,Search Engines,Shortcuts X-KDE-Keywords[ca]=Navegació millorada,navegació,WWW,Internet,Filtres d'Internet,Xarxa,Motors de cerca,Dreceres X-KDE-Keywords[ca@valencia]=Navegació millorada,navegació,WWW,Internet,Filtres d'Internet,Xarxa,Motors de cerca,Dreceres @@ -208,6 +209,7 @@ X-KDE-Keywords[fr]=Navigation avancée, navigation, WWW, Internet, filtres Internet, réseau, moteur de recherche, raccourcis X-KDE-Keywords[ga]=Brabhsáil Fheabhsaithe,Brabhsáil,WWW,Gréasán,Idirlíon,Scagairí Idirlín,Líonra,Innill Chuardaigh,Aicearraí X-KDE-Keywords[gl]=Navegación mellorada,navegar,www.internet,filtros de internet,rede, motores de busca,atallos +X-KDE-Keywords[he]=Enhanced Browsing,Browsing,WWW,Internet,Internet Filters,Network,Search Engines,Shortcuts,גלישה משופרת, גלישה, משופרת, אינטרנט, ווב, רשת,חפש, חיפוש, מנוע, קיצור X-KDE-Keywords[hu]=Fejlesztett böngészés,Böngészés,WWW,Internet,Internetes szűrők,Hálózat,Keresőmotorok,Gyorsbillentyűk X-KDE-Keywords[ia]=Navigation avantiate, Navigation,WWW,Internet,Filtros de Internet,Rete, Motores de cerca,Vias breve X-KDE-Keywords[it]=Navigazione avanzata,navigazione,WWW,Internet,filtri Internet,rete,motori di ricerca,scorciatoie diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/bookmarks.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/bookmarks.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/bookmarks.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/bookmarks.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -182,6 +182,7 @@ Comment[zh_TW]=設定書籤首頁 X-KDE-Keywords=Bookmarks X-KDE-Keywords[ar]=العلامات +X-KDE-Keywords[bg]=Отметки X-KDE-Keywords[bs]=Zabilješke X-KDE-Keywords[ca]=Adreces d'interès X-KDE-Keywords[ca@valencia]=Adreces d'interés @@ -195,8 +196,10 @@ X-KDE-Keywords[fr]=Signets X-KDE-Keywords[ga]=Leabharmharcanna X-KDE-Keywords[gl]=Marcadores +X-KDE-Keywords[he]=סימניות X-KDE-Keywords[hu]=Könyvjelzők X-KDE-Keywords[ia]=Marcatores de libro +X-KDE-Keywords[is]=Bókamerki X-KDE-Keywords[it]=Segnalibri X-KDE-Keywords[kk]=Бетбелгі X-KDE-Keywords[km]=ចំណាំ diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/cache.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/cache.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/cache.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/cache.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -110,7 +110,7 @@ Comment[ast]=Configuración de les preferencies de la caché web Comment[be]=Настаўленні сеціўнага кэша Comment[be@latin]=Naładź padručnuju pamiać sieciva -Comment[bg]=Настройване на временната памет +Comment[bg]=Настройки на временната памет Comment[bn]=ওয়েব ক্যাশে সেটিংস কনফিগার করুন Comment[bn_IN]=ওয়েব ক্যাশে সংক্রান্ত বৈশিষ্ট্য কনফিগার করুন Comment[br]=Kefluniañ krubuilh ar gwiad @@ -197,6 +197,7 @@ Comment[zh_TW]=設定網頁快取設定 X-KDE-Keywords=Cache,History,Browsing History,Ports,Size +X-KDE-Keywords[bg]=Памет,Кеш,История,Портове,Размер,Cache,History,Browsing History,Ports,Size X-KDE-Keywords[bs]=Cache,History,Browsing History,Ports,Size X-KDE-Keywords[ca]=Memòria cau,Historial,Historial del navegador,Ports,Mida X-KDE-Keywords[ca@valencia]=Memòria cau,Historial,Historial del navegador,Ports,Mida @@ -209,6 +210,7 @@ X-KDE-Keywords[fr]=Cache, historique, historique de navigation, ports, taille X-KDE-Keywords[ga]=Taisce,Stair,Stair Brabhsála,Poirt,Méid X-KDE-Keywords[gl]=Caché,historial,historial de navegación,portos,tamaño +X-KDE-Keywords[he]=Cache,History,Browsing History,Ports,Size,מטמון,היסטוריה,גלישה,גודל,יציאה,יציאות X-KDE-Keywords[hu]=Gyorsítótár,Előzmények,Böngészési előzmények,Portok,Méret X-KDE-Keywords[ia]=Cache,Historia,Historia de navigation,Portos,Grandor X-KDE-Keywords[it]=Cache,cronologia,cronologia di navigazione,porte,dimensione diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/cookies.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/cookies.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/cookies.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/cookies.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -107,7 +107,7 @@ Comment[as]=কুকিৰ কাম কৰা প্ৰক্ৰিয়া বিন্যাস কৰক Comment[ast]=Configuración del funcionamientu de les cookies Comment[be]=Наставіць cookies -Comment[bg]=Настройване на бисквитките +Comment[bg]=Настройки на бисквитките Comment[bn]=কুকি কনফিগার করুন Comment[bn_IN]=কুকি ব্যবহারের পদ্ধতি কনফিগার করুন Comment[br]=Kefluniañ peseurt mod e labour an toupinoù @@ -193,6 +193,7 @@ Comment[zh_TW]=設定 cookies 運作方式 X-KDE-Keywords=Cookies,Browsing,Internet,WWW,Network,Policy,Domains +X-KDE-Keywords[bg]=Биствитки,Сърфиране,Интернет,Уеб,Мрежа,Политики,Домейни,Cookies,Browsing,Internet,WWW,Network,Policy,Domains X-KDE-Keywords[bs]=Cookies,Browsing,Internet,WWW,Network,Policy,Domains X-KDE-Keywords[ca]=Galetes,Navegació,Internet,WWW,Xarxa,Polítiques,Dominis X-KDE-Keywords[ca@valencia]=Galetes,Navegació,Internet,WWW,Xarxa,Polítiques,Dominis @@ -205,6 +206,7 @@ X-KDE-Keywords[fr]=Cookies, navigation, Internet, WWW, réseau, politique, domaines X-KDE-Keywords[ga]=Fianáin,Brabhsáil,Idirlíon,WWW,Gréasán,Líonra,Polasaí,Fearainn X-KDE-Keywords[gl]=cookies,navegar,internet,www,rede,política,dominios +X-KDE-Keywords[he]=Cookies,Browsing,Internet,WWW,Network,Policy,Domains,עוגיות,רשת,מדיניות,מתחם X-KDE-Keywords[hu]=Sütik,Böngészés,Internet,WWW,Hálózat,Házirend,Tartományok X-KDE-Keywords[ia]=Cookies,Navigation,Internet,WWW,Rete,Politica,Dominios X-KDE-Keywords[it]=Cookie,navigazione,Internet,WWW,rete,politica,domini @@ -220,6 +222,7 @@ X-KDE-Keywords[pl]=Ciasteczka,Przeglądanie,Internet,WWW,Sieć,Polityka,Domeny X-KDE-Keywords[pt]=Cookies,Navegação,Internet,WWW,Rede,Política,Domínios X-KDE-Keywords[pt_BR]=Cookies,Navegação,Internet,WWW,Rede,Política,Domínios +X-KDE-Keywords[ro]=Cookies,Navigare,Internet,WWW,Rețea,Politică,Domenii X-KDE-Keywords[ru]=Cookies,Browsing,Internet,WWW,Network,Policy,Domains,Интернет,веб-сёрфинг,сеть,домены,политика,правило X-KDE-Keywords[sk]=Cookies,Sufrovanie,Internet,WWW,Sieť,Politika,Domény X-KDE-Keywords[sl]=piškotki,brskanje,internet,WWW,omrežje,pravilniki,domene diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/kproxydlg.cpp netrunner-desktop-containment-4.13.0/konqueror/settings/kio/kproxydlg.cpp --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/kproxydlg.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/kproxydlg.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -31,7 +31,6 @@ #include #include #include -#include // Qt #include @@ -104,19 +103,6 @@ edit->setText(QString::fromUtf8(qgetenv(envVar.constData()))); } -static bool autoDetectSystemProxy(QLineEdit* edit, const QString& envVarStr) -{ - const QStringList envVars = envVarStr.split(QL1S(","), QString::SkipEmptyParts); - Q_FOREACH (const QString & envVar, envVars) { - const QByteArray envVarUtf8(envVar.toUtf8()); - if (!qgetenv(envVarUtf8.constData()).isEmpty()) { - edit->setText(envVarStr); - return true; - } - } - return false; -} - static QString proxyUrlFromInput(KProxyDialog::DisplayUrlFlags* flags, const QLineEdit* edit, const QSpinBox* spinBox, KProxyDialog::DisplayUrlFlag flag = KProxyDialog::HideNone) @@ -165,11 +151,6 @@ QSpinBox* spinBox , KProxyDialog::DisplayUrlFlag flag) { - if (value.isEmpty()) { - return; - } - - kDebug() << value << "type=" << proxyType << manEdit << sysEdit << spinBox; const bool isSysProxy = (!value.contains(QL1C(' ')) && !value.contains(QL1C('.')) && !value.contains(QL1C(',')) && @@ -196,7 +177,7 @@ portNum = -1; } urlStr = value.left(index).trimmed(); - } else { + } else { urlStr = value.trimmed(); } @@ -260,6 +241,7 @@ connect(mUi.autoDiscoverProxyRadioButton, SIGNAL(clicked()), SLOT(slotChanged())); connect(mUi.autoScriptProxyRadioButton, SIGNAL(clicked()), SLOT(slotChanged())); connect(mUi.manualProxyRadioButton, SIGNAL(clicked()), SLOT(slotChanged())); + connect(mUi.systemProxyRadioButton, SIGNAL(clicked()), SLOT(slotChanged())); connect(mUi.noProxyRadioButton, SIGNAL(clicked()), SLOT(slotChanged())); connect(mUi.useReverseProxyCheckBox, SIGNAL(clicked()), SLOT(slotChanged())); connect(mUi.useSameProxyCheckBox, SIGNAL(clicked()), SLOT(slotChanged())); @@ -277,11 +259,11 @@ connect(mUi.manualProxyFtpSpinBox, SIGNAL(valueChanged(int)), SLOT(slotChanged())); connect(mUi.manualProxySocksSpinBox, SIGNAL(valueChanged(int)), SLOT(slotChanged())); - connect(mUi.systemProxyHttpEdit, SIGNAL(textChanged(QString)), SLOT(slotChanged())); - connect(mUi.systemProxyHttpsEdit, SIGNAL(textChanged(QString)), SLOT(slotChanged())); - connect(mUi.systemProxyFtpEdit, SIGNAL(textChanged(QString)), SLOT(slotChanged())); - connect(mUi.systemProxySocksEdit, SIGNAL(textChanged(QString)), SLOT(slotChanged())); - connect(mUi.systemNoProxyEdit, SIGNAL(textChanged(QString)), SLOT(slotChanged())); + connect(mUi.systemProxyHttpEdit, SIGNAL(textEdited(QString)), SLOT(slotChanged())); + connect(mUi.systemProxyHttpsEdit, SIGNAL(textEdited(QString)), SLOT(slotChanged())); + connect(mUi.systemProxyFtpEdit, SIGNAL(textEdited(QString)), SLOT(slotChanged())); + connect(mUi.systemProxySocksEdit, SIGNAL(textEdited(QString)), SLOT(slotChanged())); + connect(mUi.systemNoProxyEdit, SIGNAL(textEdited(QString)), SLOT(slotChanged())); } KProxyDialog::~KProxyDialog() @@ -295,10 +277,13 @@ mProxyMap[QL1S("FtpProxy")] = KProtocolManager::proxyFor(QL1S("ftp")); mProxyMap[QL1S("SocksProxy")] = KProtocolManager::proxyFor(QL1S("socks")); mProxyMap[QL1S("ProxyScript")] = KProtocolManager::proxyConfigScript(); - mProxyMap[QL1S("NoProxy")] = KProtocolManager::noProxyFor(); + mProxyMap[QL1S("NoProxy")] = KSaveIOConfig::noProxyFor(); const int proxyType = KProtocolManager::proxyType(); + // Make sure showEnvValueCheckBox is unchecked before setting proxy env var names + mUi.showEnvValueCheckBox->setChecked(false); + setProxyInformation(mProxyMap.value(QL1S("HttpProxy")), proxyType, mUi.manualProxyHttpEdit, mUi.systemProxyHttpEdit, mUi.manualProxyHttpSpinBox, HideHttpUrlScheme); setProxyInformation(mProxyMap.value(QL1S("HttpsProxy")), proxyType, mUi.manualProxyHttpsEdit, mUi.systemProxyHttpsEdit, mUi.manualProxyHttpsSpinBox, HideHttpsUrlScheme); setProxyInformation(mProxyMap.value(QL1S("FtpProxy")), proxyType, mUi.manualProxyFtpEdit, mUi.systemProxyFtpEdit, mUi.manualProxyFtpSpinBox, HideFtpUrlScheme); @@ -371,11 +356,20 @@ displayUrlFlags = flags; } else if (mUi.systemProxyRadioButton->isChecked()) { proxyType = KProtocolManager::EnvVarProxy; - mProxyMap[QL1S("HttpProxy")] = mUi.systemProxyHttpEdit->text(); - mProxyMap[QL1S("HttpsProxy")] = mUi.systemProxyHttpsEdit->text(); - mProxyMap[QL1S("FtpProxy")] = mUi.systemProxyFtpEdit->text(); - mProxyMap[QL1S("SocksProxy")] = mUi.systemProxySocksEdit->text(); - mProxyMap[QL1S("NoProxy")] = mUi.systemNoProxyEdit->text(); + if (!mUi.showEnvValueCheckBox->isChecked()) { + mProxyMap[QL1S("HttpProxy")] = mUi.systemProxyHttpEdit->text(); + mProxyMap[QL1S("HttpsProxy")] = mUi.systemProxyHttpsEdit->text(); + mProxyMap[QL1S("FtpProxy")] = mUi.systemProxyFtpEdit->text(); + mProxyMap[QL1S("SocksProxy")] = mUi.systemProxySocksEdit->text(); + mProxyMap[QL1S("NoProxy")] = mUi.systemNoProxyEdit->text(); + } + else { + mProxyMap[QL1S("HttpProxy")] = mProxyMap.take(mUi.systemProxyHttpEdit->objectName()); + mProxyMap[QL1S("HttpsProxy")] = mProxyMap.take(mUi.systemProxyHttpsEdit->objectName()); + mProxyMap[QL1S("FtpProxy")] = mProxyMap.take(mUi.systemProxyFtpEdit->objectName()); + mProxyMap[QL1S("SocksProxy")] = mProxyMap.take(mUi.systemProxySocksEdit->objectName()); + mProxyMap[QL1S("NoProxy")] = mProxyMap.take(mUi.systemNoProxyEdit->objectName()); + } } else if (mUi.autoScriptProxyRadioButton->isChecked()) { proxyType = KProtocolManager::PACProxy; mProxyMap[QL1S("ProxyScript")] = mUi.proxyScriptUrlRequester->text(); @@ -428,16 +422,38 @@ emit changed (true); } +bool KProxyDialog::autoDetectSystemProxy(QLineEdit* edit, const QString& envVarStr, bool showValue) +{ + const QStringList envVars = envVarStr.split(QL1S(","), QString::SkipEmptyParts); + Q_FOREACH (const QString & envVar, envVars) { + const QByteArray envVarUtf8(envVar.toUtf8()); + const QByteArray envVarValue = qgetenv(envVarUtf8.constData()); + if (!envVarValue.isEmpty()) { + if (showValue) { + mProxyMap[edit->objectName()] = envVar; + edit->setText(envVarValue); + } else { + edit->setText(envVar); + } + edit->setEnabled(!showValue); + return true; + } + } + return false; +} + void KProxyDialog::on_autoDetectButton_clicked() { - quint8 count = 0; - count += (autoDetectSystemProxy(mUi.systemProxyHttpEdit, ENV_HTTP_PROXY) ? 1 : 0); - count += (autoDetectSystemProxy(mUi.systemProxyHttpsEdit, ENV_HTTPS_PROXY) ? 1 : 0); - count += (autoDetectSystemProxy(mUi.systemProxyFtpEdit, ENV_FTP_PROXY) ? 1 : 0); - count += (autoDetectSystemProxy(mUi.systemProxySocksEdit, ENV_SOCKS_PROXY) ? 1 : 0); - count += (autoDetectSystemProxy(mUi.systemNoProxyEdit, ENV_NO_PROXY) ? 1 : 0); + const bool showValue = mUi.showEnvValueCheckBox->isChecked(); + bool wasChanged = false; + + wasChanged |= autoDetectSystemProxy(mUi.systemProxyHttpEdit, ENV_HTTP_PROXY, showValue); + wasChanged |= autoDetectSystemProxy(mUi.systemProxyHttpsEdit, ENV_HTTPS_PROXY, showValue); + wasChanged |= autoDetectSystemProxy(mUi.systemProxyFtpEdit, ENV_FTP_PROXY, showValue); + wasChanged |= autoDetectSystemProxy(mUi.systemProxySocksEdit, ENV_SOCKS_PROXY, showValue); + wasChanged |= autoDetectSystemProxy(mUi.systemNoProxyEdit, ENV_NO_PROXY, showValue); - if (count) + if (wasChanged) emit changed (true); } @@ -476,23 +492,23 @@ void KProxyDialog::on_showEnvValueCheckBox_toggled (bool on) { if (on) { - showSystemProxyUrl(mUi.systemProxyHttpEdit, &mProxyMap[QL1S("EnvVarProxyHttp")]); - showSystemProxyUrl(mUi.systemProxyHttpsEdit, &mProxyMap[QL1S("EnvVarProxyHttps")]); - showSystemProxyUrl(mUi.systemProxyFtpEdit, &mProxyMap[QL1S("EnvVarProxyFtp")]); - showSystemProxyUrl(mUi.systemProxySocksEdit, &mProxyMap[QL1S("EnvVarProxySocks")]); - showSystemProxyUrl(mUi.systemNoProxyEdit, &mProxyMap[QL1S("EnvVarNoProxy")]); + showSystemProxyUrl(mUi.systemProxyHttpEdit, &mProxyMap[mUi.systemProxyHttpEdit->objectName()]); + showSystemProxyUrl(mUi.systemProxyHttpsEdit, &mProxyMap[mUi.systemProxyHttpsEdit->objectName()]); + showSystemProxyUrl(mUi.systemProxyFtpEdit, &mProxyMap[mUi.systemProxyFtpEdit->objectName()]); + showSystemProxyUrl(mUi.systemProxySocksEdit, &mProxyMap[mUi.systemProxySocksEdit->objectName()]); + showSystemProxyUrl(mUi.systemNoProxyEdit, &mProxyMap[mUi.systemNoProxyEdit->objectName()]); return; } - mUi.systemProxyHttpEdit->setText(mProxyMap.take (QL1S("EnvVarProxyHttp"))); + mUi.systemProxyHttpEdit->setText(mProxyMap.take(mUi.systemProxyHttpEdit->objectName())); mUi.systemProxyHttpEdit->setEnabled(true); - mUi.systemProxyHttpsEdit->setText(mProxyMap.take (QL1S("EnvVarProxyHttps"))); + mUi.systemProxyHttpsEdit->setText(mProxyMap.take(mUi.systemProxyHttpsEdit->objectName())); mUi.systemProxyHttpsEdit->setEnabled(true); - mUi.systemProxyFtpEdit->setText(mProxyMap.take (QL1S("EnvVarProxyFtp"))); + mUi.systemProxyFtpEdit->setText(mProxyMap.take(mUi.systemProxyFtpEdit->objectName())); mUi.systemProxyFtpEdit->setEnabled(true); - mUi.systemProxySocksEdit->setText(mProxyMap.take (QL1S("EnvVarProxySocks"))); + mUi.systemProxySocksEdit->setText(mProxyMap.take(mUi.systemProxySocksEdit->objectName())); mUi.systemProxySocksEdit->setEnabled(true); - mUi.systemNoProxyEdit->setText(mProxyMap.take (QL1S("EnvVarNoProxy"))); + mUi.systemNoProxyEdit->setText(mProxyMap.take(mUi.systemNoProxyEdit->objectName())); mUi.systemNoProxyEdit->setEnabled(true); } diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/kproxydlg.h netrunner-desktop-containment-4.13.0/konqueror/settings/kio/kproxydlg.h --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/kproxydlg.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/kproxydlg.h 2014-05-26 15:31:22.000000000 +0000 @@ -60,6 +60,8 @@ void slotChanged(); private: + bool autoDetectSystemProxy(QLineEdit* edit, const QString& envVarStr, bool showValue); + Ui::ProxyDialogUI mUi; QStringList mNoProxyForList; QMap mProxyMap; diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/ksaveioconfig.cpp netrunner-desktop-containment-4.13.0/konqueror/settings/kio/ksaveioconfig.cpp --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/ksaveioconfig.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/ksaveioconfig.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -184,6 +184,12 @@ cfg.sync(); } +QString KSaveIOConfig::noProxyFor() +{ + KConfigGroup cfg(config(), "Proxy Settings"); + return cfg.readEntry("NoProxyFor"); +} + void KSaveIOConfig::setNoProxyFor( const QString& _noproxy ) { KConfigGroup cfg (config(), "Proxy Settings"); diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/ksaveioconfig.h netrunner-desktop-containment-4.13.0/konqueror/settings/kio/ksaveioconfig.h --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/ksaveioconfig.h 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/ksaveioconfig.h 2014-05-26 15:31:22.000000000 +0000 @@ -61,6 +61,7 @@ void setProxyFor (const QString&, const QString&); +QString noProxyFor(); void setNoProxyFor (const QString&); diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/netpref.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/netpref.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/netpref.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/netpref.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -19,7 +19,7 @@ Name[ast]=Preferencies de conexón Name[be]=Настаўленні злучэння Name[be@latin]=Ułasnyja nałady spałučeńnia -Name[bg]=Настройване на връзката +Name[bg]=Настройки на връзката Name[bn]=যোগাযোগ পছন্দসমূহ Name[bn_IN]=সংযোগ সংক্রান্ত পছন্দসই মান Name[br]=Kefluniadur ar gevreadenn @@ -195,6 +195,7 @@ Comment[zh_TW]=設定一般網路喜好設定,例如逾時值 X-KDE-Keywords=timeout,iopref,netpref,network preferences,ftp +X-KDE-Keywords[bg]=изчакване,мрежови настройки,timeout,iopref,netpref,network preferences,ftp X-KDE-Keywords[bs]=timeout,iopref,netpref,network preferences,ftp X-KDE-Keywords[ca]=temps d'espera,iopref,netpref,preferències de xarxa,ftp X-KDE-Keywords[ca@valencia]=temps d'espera,iopref,netpref,preferències de xarxa,ftp @@ -207,6 +208,7 @@ X-KDE-Keywords[fr]=délai dépassé, iopref, netpref, paramètres réseau, ftp X-KDE-Keywords[ga]=timeout,iopref,netpref,sainroghanna líonra,ftp X-KDE-Keywords[gl]=tempo límite,iopref,netpref,rede,preferencias,ftp +X-KDE-Keywords[he]=timeout,iopref,netpref,network preferences,ftp X-KDE-Keywords[hu]=időtúllépés,iopref,netpref,hálózati beállítások,ftp X-KDE-Keywords[ia]=expiration,iopref,prefderete,rete,preferentias,ftp X-KDE-Keywords[it]=scadenza,iopref,netpref,preferenze di rete,ftp @@ -221,6 +223,7 @@ X-KDE-Keywords[pl]=czas oczekiwania,iopref,netpref,ustawienia sieci,ftp X-KDE-Keywords[pt]=tempo-limite,iopref,netpref,preferências de rede,ftp X-KDE-Keywords[pt_BR]=tempo-limite,iopref,netpref,preferências de rede,ftp +X-KDE-Keywords[ro]=limită de timp,expirare,iopref,netpref,preferințe rețea,ftp X-KDE-Keywords[ru]=timeout,iopref,netpref,network preferences,ftp,задержка,время ожидания,таймаут,параметры сети X-KDE-Keywords[sk]=timeout,iopref,netpref,sieťové nastavenia,ftp X-KDE-Keywords[sl]=časovna omejitev,iopref,netpref,možnosti omrežja,ftp diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/proxy.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/proxy.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/proxy.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/proxy.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -76,7 +76,7 @@ Name[oc]=Proxy Name[or]=ପ୍ରକ୍ସି Name[pa]=ਪਰਾਕਸੀ -Name[pl]=Pośrednik (Proxy) +Name[pl]=Pośrednik Name[pt]=Proxy Name[pt_BR]=Proxy Name[ro]=Proxy @@ -113,7 +113,7 @@ Comment[ast]=Configuración de los sirvidores proxy usaos Comment[be]=Настаўленні сервераў проксі Comment[be@latin]=Naładź dziejnyja proxy-servery -Comment[bg]=Настройване на прокси сървъра +Comment[bg]=Настройки на прокси сървъра Comment[bn]=ব্যবহৃত প্রক্সি সার্ভার কনফিগার করুন Comment[bn_IN]=ব্যবহৃত প্রক্সি সার্ভার(গুলি) কনফিগার করুন Comment[br]=Kefluniañ ar servijeroù proksi implijet @@ -200,6 +200,7 @@ Comment[zh_TW]=設定使用的代理伺服器 X-KDE-Keywords=Proxy,Proxy server,Firewall,Squid +X-KDE-Keywords[bg]=Прокси,Прокси сървър,Защитна стена,Proxy,Proxy server,Firewall,Squid X-KDE-Keywords[bs]=Proxy,Proxy server,Firewall,Squid X-KDE-Keywords[ca]=Intermediari,Servidor intermediari,Tallafocs,Squid X-KDE-Keywords[ca@valencia]=Intermediari,Servidor intermediari,Tallafocs,Squid @@ -212,6 +213,7 @@ X-KDE-Keywords[fr]=Serveur mandataire, serveur (proxy), pare-feu, squid X-KDE-Keywords[ga]=Seachfhreastalaí,Balla Dóiteáin,Squid X-KDE-Keywords[gl]=Proxy,servidor proxy,devasa,Squid +X-KDE-Keywords[he]=Proxy,Proxy server,Firewall,Squid,פרוקסי,מתווך,שרת,חמת אש, חומה X-KDE-Keywords[hu]=Proxy,Proxy kiszolgáló,Tűzfal,Squid X-KDE-Keywords[ia]=Proxy,Servitor de Proxy,Talia Foco,Squid X-KDE-Keywords[it]=Proxy,Server proxy server,Firewall,Squid @@ -226,6 +228,7 @@ X-KDE-Keywords[pl]=Pośrednik,Serwer pośrednika,Zapora sieciowa,Squid X-KDE-Keywords[pt]=Proxy,servidor proxy,Firewall,Squid X-KDE-Keywords[pt_BR]=Proxy,Servidor proxy,Firewall,Squid +X-KDE-Keywords[ro]=Proxy,server proxy,paravan de protecție,squid X-KDE-Keywords[ru]=Proxy,Proxy server,Firewall,Squid,прокси,прокси-сервер,брандмауэр,защитный экран X-KDE-Keywords[sk]=Proxy,Proxy server,Firewall,Squid X-KDE-Keywords[sl]=Proxy,Posredniški strežnik,Požarni zid,Squid diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/smb.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/smb.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/smb.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/smb.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -192,6 +192,7 @@ Comment[zh_TW]=設定您可以瀏覽的 Windows (SMB) 檔案系統 X-KDE-Keywords=SMB,SAMBA,SMB client,Windows network,LAN,Network,neighborhood,Server,Broadcast,WINS,Share,Login,Passwords +X-KDE-Keywords[bg]=Уиндоус,Локална мрежа,Лан,Сървър,Споделяне,Пароли,SMB,SAMBA,SMB client,Windows network,LAN,Network,neighborhood,Server,Broadcast,WINS,Share,Login,Passwords X-KDE-Keywords[bs]=SMB,SAMBA,SMB client,Windows network,LAN,Network,neighborhood,Server,Broadcast,WINS,Share,Login,Passwords X-KDE-Keywords[ca]=SMB,SAMBA,Client SMB,Xarxa Windows,LAN,Xarxa,veïnat,Servidor,Difusió,WINS,Compartició,Connexió,Contrasenyes X-KDE-Keywords[ca@valencia]=SMB,SAMBA,Client SMB,Xarxa Windows,LAN,Xarxa,veïnat,Servidor,Difusió,WINS,Compartició,Connexió,Contrasenyes @@ -204,6 +205,7 @@ X-KDE-Keywords[fr]=SMB, SAMBA,client SMB, réseau Windows, LAN, réseau, voisinage,Serveur, diffusion, WINS, partages, connexion, mots de passe X-KDE-Keywords[ga]=SMB,SAMBA,cliant SMB,líonra Windows,LAN,Líonra,comharsanacht,Freastalaí,Craoladh,WINS,Comhroinn,Logáil Isteach,Focail Fhaire X-KDE-Keywords[gl]=SMB,SAMBA,cliente SMB,rede de windows,LAN,rede,veciñanza,servidor, retransmisión,WINS,compartición,compartir,acceso,contrasinais +X-KDE-Keywords[he]=SMB,SAMBA,SMB client,Windows network,LAN,Network,neighborhood,Server,Broadcast,WINS,Share,Login,Passwords,חלונות,סמבה,שיתוף,תיקייה,ססמה,משתמש X-KDE-Keywords[hu]=SMB,SAMBA,SMB kliens,Windows hálózat,LAN,Hálózat,szomszéd,Kiszolgáló,Broadcast,WINS,Megosztás,Bejelentkezés,Jelszavak X-KDE-Keywords[ia]=SMB,SAMBA,Cliente SMB,rete de Windows,LAN,rete,vicinitate,Servitor,Transmission,WINS,Compartite,Authentication,Contrasignos X-KDE-Keywords[it]=SMB,SAMBA,client SMB,rete di Windows,LAN,Rete,vicinanza,Server,Broadcast,WINS,Share,Login,Password @@ -218,6 +220,7 @@ X-KDE-Keywords[pl]=SMB,SAMBA,Klient SMB,Sieć Windows, LAN,Sieć,otoczenie,Serwer,Broadcast,WINS,Udostępnianie,Współdzielenie,Login,Hasła X-KDE-Keywords[pt]=SMB,SAMBA,cliente de SMB,rede Windows,LAN,rede,vizinhança,servidor,difusão,WINS,partilha,conta,senhas X-KDE-Keywords[pt_BR]=SMB,SAMBA,Cliente de SMB,Rede Windows,LAN,Rede,vizinhança,Servidor,Difusão,WINS,Compartilhamento,Autenticação,Senhas +X-KDE-Keywords[ro]=SMB,SAMBA,client SMB,rețea Windows,LAN,rețea,vecinătate,server,difuzare,WINS,partajare,autentificare,parole X-KDE-Keywords[ru]=SMB,SAMBA,SMB client,Windows network,LAN,Network,neighborhood,Server,Broadcast,WINS,Share,Login,Passwords,клиент SMB,сеть Windows,сеть,соседи,широковещание,совместный доступ,логин,имя пользователя,пароль X-KDE-Keywords[sk]=SMB,SAMBA,SMB klient,Sieť Windows,LAN,Sieť,okolie,Server,Broadcast,WINS,Zdieľanie,Login,Heslá X-KDE-Keywords[sl]=SMB,SAMBA,Odjemalec SMB,omrežje Windows,LAN,Omrežje,soseska,Strežnik,Vsesmerno oddajanje,WINS,Deljenje,Prijava,Gesla diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/android10.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/android10.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/android10.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/android10.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -77,3 +77,4 @@ X-KDE-UA-FULL=Mozilla/5.0 (Linux; U; Android 1.0; appLanguage; dream) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2 X-KDE-UA-NAME=Android X-KDE-UA-VERSION=1.0 +X-KDE-UA-DYNAMIC-ENTRY=1 diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/chrome10onwinnt51.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/chrome10onwinnt51.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/chrome10onwinnt51.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/chrome10onwinnt51.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -78,3 +78,4 @@ X-KDE-UA-VERSION=1.0.154.39 X-KDE-UA-SYSNAME=Windows X-KDE-UA-SYSRELEASE=XP +X-KDE-UA-DYNAMIC-ENTRY=1 diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/chrome22oncurrent.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/chrome22oncurrent.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/chrome22oncurrent.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/chrome22oncurrent.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -1,7 +1,9 @@ [Desktop Entry] Name=UADescription (Google Chrome 22.0) +Name[bg]=UADescription (Google Chrome 22.0) Name[bs]=UADescription (Google Chrome 22.0) Name[ca]=Descripció AU (Google Chrome 22.0) +Name[ca@valencia]=Descripció AU (Google Chrome 22.0) Name[cs]=Popis agenta (Google Chrome 22.0) Name[da]=Brugeragentbeskrivelse (Google Chrome 22.0) Name[de]=Browserkennung (Google Chrome 22.0) @@ -12,14 +14,17 @@ Name[fr]=UADescription (Google Chrome 22.0) Name[ga]=UADescription (Google Chrome 22.0) Name[gl]=UADescription (Google Chrome 22.0) +Name[he]=UADescription (Google Chrome 22.0) Name[hu]=Böngészőtípus (Google Chrome 22.0) Name[ia]=UADescription (Google Chrome 22.0) +Name[is]=UADescription (Google Chrome 22.0) Name[it]=Descrizione UA (Google Chrome 22.0) Name[kk]=UADescription (Google Chrome 22.0) Name[ko]=UADescription (Google 크롬 22.0) Name[lt]=NA Aprašymas (Google Chrome 22.0) Name[mr]=UAडिस्क्रिप्शन (Google Chrome 22.0) Name[nb]=Brukeragent (Google Chrome 22.0) +Name[nds]=UA-Beschrieven (Google Chrome 22.0) Name[nl]=GA-beschrijving (Google Chrome 22.0) Name[pa]=UADescription (ਗੂਗਲ ਕਰੋਮ ੨੨.੦) Name[pl]=Opis przeglądarki użytkownika (Google Chrome 22.0) diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/chrome23oncurrent.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/chrome23oncurrent.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/chrome23oncurrent.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/chrome23oncurrent.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -1,7 +1,9 @@ [Desktop Entry] Name=UADescription (Google Chrome 23.0) +Name[bg]=UADescription (Google Chrome 23.0) Name[bs]=UADescription (Google Chrome 23.0) Name[ca]=Descripció AU (Google Chrome 23.0) +Name[ca@valencia]=Descripció AU (Google Chrome 23.0) Name[cs]=Popis agenta (Google Chrome 23.0) Name[da]=Brugeragentbeskrivelse (Google Chrome 23.0) Name[de]=Browserkennung (Google Chrome 23.0) @@ -12,14 +14,17 @@ Name[fr]=UADescription (Google Chrome 23.0) Name[ga]=UADescription (Google Chrome 23.0) Name[gl]=UADescription (Google Chrome 23.0) +Name[he]=UADescription (Google Chrome 23.0) Name[hu]=Böngészőtípus (Google Chrome 23.0) Name[ia]=UADescription (Google Chrome 23.0) +Name[is]=UADescription (Google Chrome 23.0) Name[it]=Descrizione UA (Google Chrome 23.0) Name[kk]=UADescription (Google Chrome 23.0) Name[ko]=UADescription (Google 크롬 23.0) Name[lt]=NA Aprašymas (Google Chrome 23.0) Name[mr]=UAडिस्क्रिप्शन (Google Chrome 23.0) Name[nb]=Brukeragent (Google Chrome 23.0) +Name[nds]=UA-Beschrieven (Google Chrome 23.0) Name[nl]=GA-beschrijving (Google Chrome 23.0) Name[pa]=UADescription (ਗੂਗਲ ਕਰੋਮ ੨੩.੦) Name[pl]=Opis przeglądarki użytkownika (Google Chrome 23.0) diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/chrome24oncurrent.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/chrome24oncurrent.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/chrome24oncurrent.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/chrome24oncurrent.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -1,7 +1,9 @@ [Desktop Entry] Name=UADescription (Google Chrome 24.0) +Name[bg]=UADescription (Google Chrome 24.0) Name[bs]=UADescription (Google Chrome 24.0) Name[ca]=Descripció AU (Google Chrome 24.0) +Name[ca@valencia]=Descripció AU (Google Chrome 24.0) Name[cs]=Popis agenta (Google Chrome 24.0) Name[da]=Brugeragentbeskrivelse (Google Chrome 24.0) Name[de]=Browserkennung (Google Chrome 24.0) @@ -12,14 +14,17 @@ Name[fr]=UADescription (Google Chrome 24.0) Name[ga]=UADescription (Google Chrome 24.0) Name[gl]=UADescription (Google Chrome 24.0) +Name[he]=UADescription (Google Chrome 24.0) Name[hu]=Böngészőtípus (Google Chrome 24.0) Name[ia]=UADescription (Google Chrome 24.0) +Name[is]=UADescription (Google Chrome 24.0) Name[it]=Descrizione UA (Google Chrome 24.0) Name[kk]=UADescription (Google Chrome 24.0) Name[ko]=UADescription (Google 크롬 24.0) Name[lt]=NA Aprašymas (Google Chrome 24.0) Name[mr]=UAडिस्क्रिप्शन (Google Chrome 24.0) Name[nb]=Brukeragent (Google Chrome 24.0) +Name[nds]=UA-Beschrieven (Google Chrome 24.0) Name[nl]=GA-beschrijving (Google Chrome 24.0) Name[pa]=UADescription (ਗੂਗਲ ਕਰੋਮ ੨੪.੦) Name[pl]=Opis przeglądarki użytkownika (Google Chrome 24.0) diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/CMakeLists.txt netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/CMakeLists.txt --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/CMakeLists.txt 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/CMakeLists.txt 2014-05-26 15:31:22.000000000 +0000 @@ -1,31 +1,3 @@ -install(FILES - android10.desktop - chrome10onwinnt51.desktop - chrome50oncurrent.desktop - ie401onwinnt4.desktop - ie50onppc.desktop - ie55onwinnt5.desktop - ie60onwinnt51.desktop - ie60oncurrent.desktop - ie70onwinnt51.desktop - nn301oncurrent.desktop - nn475onwin95.desktop - nn475oncurrent.desktop - op403onwinnt4.desktop - op85oncurrent.desktop - op90oncurrent.desktop - op962oncurrent.desktop - lynxoncurrent.desktop - w3moncurrent.desktop - wgetoncurrent.desktop - ns71oncurrent.desktop - ns71onwinnt51.desktop - safari20.desktop - safari32.desktop - safari40.desktop - safari30oniphone.desktop - googlebot.desktop - firefox20oncurrent.desktop - firefox30oncurrent.desktop - firefox36oncurrent.desktop -DESTINATION ${SERVICES_INSTALL_DIR}/useragentstrings) +FILE(GLOB useragents *.desktop) +install(FILES ${useragents} DESTINATION + ${SERVICES_INSTALL_DIR}/useragentstrings) diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/firefox15oncurrent.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/firefox15oncurrent.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/firefox15oncurrent.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/firefox15oncurrent.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -1,7 +1,9 @@ [Desktop Entry] Name=UADescription (Firefox 15 on current) +Name[bg]=UADescription (Firefox 15 на текущата система) Name[bs]=UADescription (Firefox 15 tekući) Name[ca]=Descripció AU (Firefox 15 a l'actual) +Name[ca@valencia]=Descripció AU (Firefox 15 a l'actual) Name[cs]=Popis agenta (Firefox 15 na aktuálním) Name[da]=Brugeragentbeskrivelse (Firefox 15.0 på nuværende) Name[de]=Browserkennung (Firefox 15 unter aktuellem Betriebssystem) @@ -12,19 +14,23 @@ Name[fr]=UADescription (Firefox 15 sous le système actuel) Name[ga]=UADescription (Firefox 15 ar an gcóras reatha) Name[gl]=UADescription (Firefox 15 no actual) +Name[he]=UADescription (Firefox 15 on current) Name[hu]=Böngészőtípus (Firefox 15.0) Name[ia]=UADescription (Firefox 15 super le currente) +Name[is]=UADescription (Firefox 15 á núverandi) Name[it]=Descrizione UA (Firefox 15 sul sistema attuale) Name[kk]=UADescription (Firefox 15 осында) Name[ko]=UADescription (현재 플랫폼의 Firefox 15) Name[lt]=NA Aprašymas (Firefox 15 iki naujausios) Name[mr]=UAडिस्क्रिप्शन (वर्तमान फायरफॉक्स 15 वर) Name[nb]=Brukeragent (Firefox 15 herifra) +Name[nds]=UA-Beschrieven (Firefox 15 op dit Systeem) Name[nl]=GA-beschrijving (Firefox 15 op huidige) Name[pa]=UADescription (ਮੌਜੂਦਾ ਉੱਤੇ ਫਾਇਰਫਾਕਸ 15) Name[pl]=Opis przeglądarki użytkownika (Firefox 15, na bieżącym systemie) Name[pt]=UADescription (Firefox 15 no sistema actual) Name[pt_BR]=UADescription (Firefox 15 no sistema atual) +Name[ro]=Descriere AU (Firefox 15 pe sistemul curent) Name[ru]=UADescription (Firefox 15 на текущей системе) Name[sk]=Popis agenta (Firefox 15 na aktuálnom) Name[sl]=Opis UP (Firefox 15 na trenutnem) diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/firefox16oncurrent.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/firefox16oncurrent.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/firefox16oncurrent.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/firefox16oncurrent.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -1,7 +1,9 @@ [Desktop Entry] Name=UADescription (Firefox 16 on current) +Name[bg]=UADescription (Firefox 16 на текущата система) Name[bs]=UADescription (Firefox 16 tekući) Name[ca]=Descripció AU (Firefox 16 a l'actual) +Name[ca@valencia]=Descripció AU (Firefox 16 a l'actual) Name[cs]=Popis agenta (Firefox 16 na aktuálním) Name[da]=Brugeragentbeskrivelse (Firefox 16 på nuværende) Name[de]=Browserkennung (Firefox 16 auf aktuellem Betriebssystem) @@ -12,19 +14,23 @@ Name[fr]=UADescription (Firefox 16 sous le système actuel) Name[ga]=UADescription (Firefox 16 ar an gcóras reatha) Name[gl]=UADescription (Firefox 16 no actual) +Name[he]=UADescription (Firefox 16 on current) Name[hu]=Böngészőtípus (Firefox 16.0) Name[ia]=UADescription (Firefox 16 super le currente) +Name[is]=UADescription (Firefox 16 á núverandi) Name[it]=Descrizione UA (Firefox 16 sul sistema attuale) Name[kk]=UADescription (Firefox 16 осында) Name[ko]=UADescription (현재 플랫폼의 Firefox 16) Name[lt]=NA Aprašymas (Firefox 16 iki naujausios) Name[mr]=UAडिस्क्रिप्शन (वर्तमान फायरफॉक्स 16 वर) Name[nb]=Brukeragent (Firefox 16 herifra) +Name[nds]=UA-Beschrieven (Firefox 16 op dit Systeem) Name[nl]=UADescription (Firefox 16 op huidige) Name[pa]=UADescription (ਮੌਜੂਦਾ ਉੱਤੇ ਫਾਇਰਫਾਕਸ 16) Name[pl]=Opis przeglądarki użytkownika (Firefox 16, na bieżącym systemie) Name[pt]=UADescription (Firefox 16 no sistema actual) Name[pt_BR]=UADescription (Firefox 16 no sistema atual) +Name[ro]=Descriere AU (Firefox 16 pe sistemul curent) Name[ru]=UADescription (Firefox 16 на текущей системе) Name[sk]=Popis agenta (Firefox 16 na aktuálnom) Name[sl]=Opis UP (Firefox 16 na trenutnem) diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/firefox20oncurrent.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/firefox20oncurrent.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/firefox20oncurrent.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/firefox20oncurrent.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -6,7 +6,7 @@ Name[ast]=UADescription (Firefox 2.0 n'actual) Name[be]=UADescription (Firefox 2.0 на гэтай сістэме) Name[be@latin]=UADescription (Firefox 2.0 na hetaj systemie) -Name[bg]=UADescription (текущо Firefox 2.0) +Name[bg]=UADescription (Firefox 2.0 на текущата система) Name[bn]=UADescription (Firefox 2.0 on current) Name[bn_IN]=UADescription (সাম্প্রতিক সংস্করণের মধ্যে Firefox 2.0) Name[bs]=UADescription (Firefox 2.0 tekući) diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/ie80onwinnt60.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/ie80onwinnt60.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/ie80onwinnt60.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/ie80onwinnt60.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -1,7 +1,9 @@ [Desktop Entry] Name=UADescription (IE 8.0 on Windows Vista) +Name[bg]=UADescription (IE 8.0 на Windows Vista) Name[bs]=UADescription (IE 8.0 na Windows Vista) Name[ca]=Descripció AU (IE 8.0 en Windows Vista) +Name[ca@valencia]=Descripció AU (IE 8.0 en Windows Vista) Name[cs]=Popis agenta (IE 8.0 na Windows Vista) Name[da]=Brugeragentbeskrivelse (IE 8.0 på Windows Vista) Name[de]=Browserkennung (IE 8.0 unter Windows Vista) @@ -12,14 +14,17 @@ Name[fr]=UADescription (IE 8.0 sous Windows Vista) Name[ga]=UADescription (IE 8.0 ar Windows Vista) Name[gl]=UADescription (IE 8.0 en Windows Vista) +Name[he]=UADescription (IE 8.0 on Windows Vista) Name[hu]=Böngészőtípus (IE 8.0, Windows Vista) Name[ia]=UADescription (IE 8.0 super Windows Vista ) +Name[is]=UADescription (IE 8.0 á Windows Vista) Name[it]=Descrizione UA (IE 8.0 su Windows Vista) Name[kk]=UADescription (IE 8.0 / Windows Vista) Name[ko]=UADescription (Windows Vista의 IE 8.0) Name[lt]=NA Aprašymas (IE 8.0, Windows Vista) Name[mr]=UAडिस्क्रिप्शन (IE 8.0 विंडोज व्हिस्टा वर) Name[nb]=Brukeragent (IE 8.0 på Windows Vista) +Name[nds]=UA-Beschrieven (IE 8.0 op Windows Vista) Name[nl]=GA-beschrijving (IE 8.0 op Windows Vista) Name[pa]=UADescription (ਵਿੰਡੋ XP ਉੱਤੇ IE 8.0) Name[pl]=Opis przeglądarki użytkownika (IE 8.0 na Windows Vista) diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/ie90onwinnt71.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/ie90onwinnt71.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/ie90onwinnt71.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/ie90onwinnt71.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -1,7 +1,9 @@ [Desktop Entry] Name=UADescription (IE 9.0 on Windows Seven) +Name[bg]=UADescription (IE 9.0 на Windows Seven) Name[bs]=UADescription (IE 8.0 na Windows 7) Name[ca]=Descripció AU (IE 9.0 en Windows 7) +Name[ca@valencia]=Descripció AU (IE 9.0 en Windows 7) Name[cs]=Popis agenta (IE 9.0 na Windows 7) Name[da]=Brugeragentbeskrivelse (IE 9.0 på Windows 7) Name[de]=Browserkennung (IE 9.0 unter Windows 7) @@ -12,14 +14,17 @@ Name[fr]=UADescription (IE 9.0 sous Windows 7) Name[ga]=UADescription (IE 9.0 ar Windows 7) Name[gl]=UADescription (IE 9.0 en Windows Vista) +Name[he]=UADescription (IE 9.0 on Windows Seven) Name[hu]=Böngészőtípus (IE 9.0, Windows 7) Name[ia]=UADescription (IE 9.0 super Windows Seven) +Name[is]=UADescription (IE 9.0 á Windows 7) Name[it]=Descrizione UA (IE 9.0 su Windows 7) Name[kk]=UADescription (IE 9.0 / Windows 7) Name[ko]=UADescription (Windows 7의 IE 9.0) Name[lt]=NA Aprašymas (IE 9.0, Windows 7) Name[mr]=UAडिस्क्रिप्शन (IE 9.0 विंडोज सेव्हन वर) Name[nb]=Brukeragent (IE 9.0 på Windows Seven) +Name[nds]=UA-Beschrieven (IE 9.0 op Windows Seven) Name[nl]=GA-beschrijving (IE 9.0 op Windows 7) Name[pa]=UADescription (ਵਿੰਡੋ XP ਉੱਤੇ IE 9.0) Name[pl]=Opis przeglądarki użytkownika (IE 9.0 na Windows Vista) diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/op1162oncurrent.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/op1162oncurrent.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/op1162oncurrent.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/op1162oncurrent.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -1,7 +1,9 @@ [Desktop Entry] Name=UADescription (Opera 11.62 on current) +Name[bg]=UADescription (Opera 11.62 на текущата система) Name[bs]=UADescription (Opera 11.62 na tekućem) Name[ca]=Descripció AU (Opera 11.62 a l'actual) +Name[ca@valencia]=Descripció AU (Opera 11.62 a l'actual) Name[cs]=Popis agenta (Opera 11.62 na aktuálním) Name[da]=Brugeragentbeskrivelse (Opera 11.62 på nuværende) Name[de]=Browserkennung (Opera 11.62 auf aktuellem Betriebssystem) @@ -12,19 +14,23 @@ Name[fr]=UADescription (Opera 11.62 sous le système actuel) Name[ga]=UADescription (Opera 11.62 ar an gcóras reatha) Name[gl]=UADescription (Opera 11.62 no actual) +Name[he]=UADescription (Opera 11.62 on current) Name[hu]=Böngészőtípus (Opera 11.62) Name[ia]=UADescription (Opera 11.62 super le currente) +Name[is]=UADescription (Opera 11.62 á núverandi) Name[it]=Descrizione UA (Opera 11.62 sul sistema attuale) Name[kk]=UADescription (Opera 11.62 осында) Name[ko]=UADescription (현재 플랫폼의 Opera 11.62) Name[lt]=NA Aprašymas (Opera 11.62 iki naujausios) Name[mr]=UAडिस्क्रिप्शन (वर्तमानातील ऑपेरा 11.62 वर) Name[nb]=Brukeragent (Opera 11.62 herifra) +Name[nds]=UA-Beschrieven (Opera 11.62 op dit Systeem) Name[nl]=GA-beschrijving (Opera 11.62 op huidige) Name[pa]=UADescription (ਮੌਜੂਦਾ ਉੱਤੇ ਓਪੇਰਾ 11.62) Name[pl]=Opis przeglądarki użytkownika (Opera 11.62 na bieżącym systemie) Name[pt]=UADescription (Opera 11.62 no sistema actual) Name[pt_BR]=UADescription (Opera 11.62 no sistema atual) +Name[ro]=Descriere AU (Opera 11.62 pe sistemul curent) Name[ru]=UADescription (Opera 11.62 на текущей системе) Name[sk]=Popis agenta (Opera 11.62 na aktuálnom) Name[sl]=Opis UP (Opera 11.62 na trenutnem) diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/op1202oncurrent.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/op1202oncurrent.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/op1202oncurrent.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/op1202oncurrent.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -1,7 +1,9 @@ [Desktop Entry] Name=UADescription (Opera 12.02 on current) +Name[bg]=UADescription (Opera 12.02 на текущата система) Name[bs]=UADescription (Opera 12.02 na tekućem) Name[ca]=Descripció AU (Opera 12.02 a l'actual) +Name[ca@valencia]=Descripció AU (Opera 12.02 a l'actual) Name[cs]=Popis agenta (Opera 12.02 na aktuálním) Name[da]=Brugeragentbeskrivelse (Opera 12.02 på nuværende) Name[de]=Browserkennung (Opera 12.02 auf aktuellem Betriebssystem) @@ -12,19 +14,23 @@ Name[fr]=UADescription (Opera 12.02 sous le système actuel) Name[ga]=UADescription (Opera 12.02 ar an gcóras reatha) Name[gl]=UADescription (Opera 12.02 no actual) +Name[he]=UADescription (Opera 12.02 on current) Name[hu]=Böngészőtípus (Opera 12.02) Name[ia]=UADescription (Opera 12.02 super le currente) +Name[is]=UADescription (Opera 12.02 á núverandi) Name[it]=Descrizione UA (Opera 12.02 sul sistema attuale) Name[kk]=UADescription (Opera 12.02 осында) Name[ko]=UADescription (현재 플랫폼의 Opera 12.02) Name[lt]=NA Aprašymas (Opera 12.02 iki naujausios) Name[mr]=UAडिस्क्रिप्शन (वर्तमानातील ऑपेरा 12.02 वर) Name[nb]=Brukeragent (Opera 12.02 herifra) +Name[nds]=UA-Beschrieven (Opera 12.02 op dit Systeem) Name[nl]=GA-beschrijving (Opera 12.02 op huidige) Name[pa]=UADescription (ਮੌਜੂਦਾ ਉੱਤੇ ਓਪੇਰਾ 12.02) Name[pl]=Opis przeglądarki użytkownika (Opera 12.02 na bieżącym systemie) Name[pt]=UADescription (Opera 12.02 no sistema actual) Name[pt_BR]=UADescription (Opera 12.02 no sistema atual) +Name[ro]=Descriere AU (Opera 12.02 pe sistemul curent) Name[ru]=UADescription (Opera 12.02 на текущей системе) Name[sk]=Popis agenta (Opera 12.02 na aktuálnom) Name[sl]=Opis UP (Opera 12.02 na trenutnem) diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/op85oncurrent.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/op85oncurrent.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/op85oncurrent.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/op85oncurrent.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -6,7 +6,7 @@ Name[ast]=UADescription (Opera 8.5 n'actual) Name[be]=UADescription (Opera 7.53 на гэтай сістэме) Name[be@latin]=UADescription (Opera 8.5 na hetaj systemie) -Name[bg]=UADescription (Opera 7.53 на текущата система) +Name[bg]=UADescription (Opera 8.5 на текущата система) Name[bn]=UADescription (Opera 8.5 on current) Name[bn_IN]=UADescription (সাম্প্রতিক সংস্করণের মধ্যে Opera 8.5) Name[bs]=UADescription (Opera 8.5 na tekućem) diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/safari20.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/safari20.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/safari20.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/safari20.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -94,3 +94,4 @@ X-KDE-UA-VERSION=2.0 X-KDE-UA-SYSNAME=Mac OS X-KDE-UA-SYSRELEASE=X +X-KDE-UA-DYNAMIC-ENTRY=1 diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/safari30oniphone.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/safari30oniphone.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/safari30oniphone.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/safari30oniphone.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -78,3 +78,4 @@ X-KDE-UA-VERSION=3.0 X-KDE-UA-SYSNAME=(iPhone) Mac OS X-KDE-UA-SYSRELEASE=X +X-KDE-UA-DYNAMIC-ENTRY=1 diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/safari32.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/safari32.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/safari32.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/safari32.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -78,3 +78,4 @@ X-KDE-UA-VERSION=3.2 X-KDE-UA-SYSNAME=Mac OS X-KDE-UA-SYSRELEASE=X +X-KDE-UA-DYNAMIC-ENTRY=1 diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/safari40.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/safari40.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/safari40.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/safari40.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -73,3 +73,4 @@ X-KDE-UA-VERSION=4.0 X-KDE-UA-SYSNAME=Mac OS X-KDE-UA-SYSRELEASE=X +X-KDE-UA-DYNAMIC-ENTRY=1 diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/safari517.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/safari517.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/safari517.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/safari517.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -1,7 +1,9 @@ [Desktop Entry] Name=UADescription (Safari 5.1.7 on MacOS X) +Name[bg]=UADescription (Safari 5.1.7 на MacOS X) Name[bs]=UADescription (Safari 5.1.7 na MacOS‑u X) Name[ca]=Descripció AU (Safari 5.1.7 a MacOS X) +Name[ca@valencia]=Descripció AU (Safari 5.1.7 a MacOS X) Name[cs]=Popis agenta (Safari 5.1.7 na MacOS X) Name[da]=Brugeragentbeskrivelse (Safari 5.1.7 på MacOS X) Name[de]=Browserkennung (Safari 5.1.7 unter MacOS X) @@ -12,19 +14,23 @@ Name[fr]=UADescription (Safari 5.1.7 sous MacOS X) Name[ga]=UADescription (Safari 5.1.7 ar MacOS X) Name[gl]=UADescription (Safari 5.1.7 en MacOS X) +Name[he]=UADescription (Safari 5.1.7 on MacOS X) Name[hu]=Böngészőtípus (Safari 5.1.7, Mac OS X) Name[ia]=UADescription (Safari 5.1.7 super MacOS X) +Name[is]=UADescription (Safari 5.1.7 á MacOS X) Name[it]=Descrizione UA (Safari 5.1.7 su MacOS X) Name[kk]=UADescription (Safari 5.1.7 / MacOS X) Name[ko]=UADescription (Mac OS X의 Safari 5.1.7) Name[lt]=NA Aprašymas (Safari 5.1.7, MacOS X) Name[mr]=UAडिस्क्रिप्शन (मॅक-ओएस X वरील सफारी 5.1.7) Name[nb]=Brukeragent (Safari 5.1.7 på MacOS X) +Name[nds]=UA-Beschrieven (Safari 5.1.7 op MacOS X) Name[nl]=GA-beschrijving (Safari 5.1.7 op MacOS X) Name[pa]=UADescription (MacOS X ਉੱਤੇ ਸਫ਼ਾਰੀ 5.1.7) Name[pl]=Opis przeglądarki użytkownika (Safari 5.1.7 na MacOS X) Name[pt]=UADescription (Safari 5.1.7 no MacOS X) Name[pt_BR]=UADescription (Safari 5.1.7 no MacOS X) +Name[ro]=Descriere AU (Safari 5.1.7 pe MacOS X) Name[ru]=UADescription (Safari 5.1.7 на Mac OS X) Name[sk]=Popis agenta (Safari 5.1.7 na MacOS X) Name[sl]=Opis UP (Safari 5.1.7 na MacOS X) @@ -46,3 +52,4 @@ X-KDE-UA-VERSION=5.1.7 X-KDE-UA-SYSNAME=Mac OS X-KDE-UA-SYSRELEASE=X +X-KDE-UA-DYNAMIC-ENTRY=1 diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/safari60.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/safari60.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/uasproviders/safari60.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/uasproviders/safari60.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -1,7 +1,9 @@ [Desktop Entry] Name=UADescription (Safari 6.0 on MacOS X) +Name[bg]=UADescription (Safari 6.0 на MacOS X) Name[bs]=UADescription (Safari 6.0 na MacOS‑u X) Name[ca]=Descripció AU (Safari 6.0 a MacOS X) +Name[ca@valencia]=Descripció AU (Safari 6.0 a MacOS X) Name[cs]=Popis agenta (Safari 6.0 na MacOS X) Name[da]=Brugeragentbeskrivelse (Safari 6.0 på MacOS X) Name[de]=Browserkennung (Safari 6.0 unter MacOS X) @@ -11,20 +13,24 @@ Name[fi]=Käyttäjäagenttikuvaus (Safari 6.0 MacOS X:llä) Name[fr]=UADescription (Safari 6.0 sous MacOS X) Name[ga]=UADescription (Safari 6.0 ar MacOS X) -Name[gl]=UADescription (Safari 6.0 en MacOS X) +Name[gl]=UADescription (Safari 6.0 en MacOS X) +Name[he]=UADescription (Safari 6.0 on MacOS X) Name[hu]=Böngészőtípus (Safari 6.0, Mac OS X) Name[ia]=UADescription (Safari 6.0 super MacOS X) +Name[is]=UADescription (Safari 6.0 á MacOS X) Name[it]=Descrizione UA (Safari 6.0 su MacOS X) Name[kk]=UADescription (Safari 6.0 / MacOS X) Name[ko]=UADescription (Mac OS X의 Safari 6.0) Name[lt]=NA Aprašymas (Safari 6.0, MacOS X) Name[mr]=UAडिस्क्रिप्शन (मॅक-ओएस X वरील सफारी 6.0) Name[nb]=Brukeragent (Safari 6.0 på MacOS X) +Name[nds]=UA-Beschrieven (Safari 6.0 op MacOS X) Name[nl]=GA-beschrijving (Safari 6.0 op MacOS X) Name[pa]=UADescription (MacOS X ਉੱਤੇ ਸਫ਼ਾਰੀ 6.0) Name[pl]=Opis przeglądarki użytkownika (Safari 6.0 na MacOS X) Name[pt]=UADescription (Safari 6.0 no MacOS X) Name[pt_BR]=UADescription (Safari 6.0 no MacOS X) +Name[ro]=Descriere AU (Safari 6.0 pe MacOS X) Name[ru]=UADescription (Safari 6.0 на Mac OS X) Name[sk]=Popis agenta (Safari 6.0 na MacOS X) Name[sl]=Opis UP (Safari 6.0 na MacOS X) @@ -46,3 +52,4 @@ X-KDE-UA-VERSION=6.0 X-KDE-UA-SYSNAME=Mac OS X-KDE-UA-SYSRELEASE=X +X-KDE-UA-DYNAMIC-ENTRY=1 diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/kio/useragent.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/kio/useragent.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/kio/useragent.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/kio/useragent.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -191,9 +191,10 @@ Comment[zh_TW]=設定 Konqueror 回報自身狀況的方式 X-KDE-Keywords=User Agent,Browser,Internet,WWW,Network,agent,bindings,server,login +X-KDE-Keywords[bg]=Браузър,Идентификация,Агент,Интернет,Уеб,Мрежа,User Agent,Browser,Internet,WWW,Network,agent,bindings,server,login X-KDE-Keywords[bs]=User Agent,Browser,Internet,WWW,Network,agent,bindings,server,login X-KDE-Keywords[ca]=Agent d'usuari,Navegador,Internet,WWW,Xarxa,agent,lligams,servidor,connexió -X-KDE-Keywords[ca@valencia]=Agent d'usuari,Navagador,Internet,WWW,Xarxa,agent,lligams,servidor,connexió +X-KDE-Keywords[ca@valencia]=Agent d'usuari,Navegador,Internet,WWW,Xarxa,agent,lligams,servidor,connexió X-KDE-Keywords[da]=User agent,brugeragent,internet,www,netværk,agent,bindinger,server,login X-KDE-Keywords[de]=Browserkennung,Internetprogramm,Browser,Internet,WWW,Netzwerk,Server,Zuordnungen,Anmeldung X-KDE-Keywords[el]=Πράκτορας χρήστη,περιηγητής,διαδίκτυο,www,δίκτυο,πράκτορας,δεσμεύσεις,εξυπηρετητής,είσοδος @@ -203,6 +204,7 @@ X-KDE-Keywords[fr]=Agent utilisateur, navigateur, Internet, www, réseau, agent, liens, serveur, connexion X-KDE-Keywords[ga]=UserAgent,gníomhaire úsáideora,Brabhsálaí,Idirlíon,WWW,Líonra,Gréasán,gníomhaire,ceangail,freastalaí,logáil isteach X-KDE-Keywords[gl]=Programa cliente,navegador,internet,www,rede,axente,cliente,asociacións,servidor,acceso +X-KDE-Keywords[he]=User Agent,Browser,Internet,WWW,Network,agent,bindings,server,login,זיהוי,דפדפן,אינטרנט,רשת,שרת,חיבור X-KDE-Keywords[hu]=Böngészőazonosító,Böngésző,Internet,WWW,Hálózat,azonosító,kötések,kiszolgáló,bejelentkezés X-KDE-Keywords[ia]=Agente usator,Navigator,Internet,WWW,Rete.agente,ligamines,servitor,authentication X-KDE-Keywords[it]=Identificazione del browser,browser,Internet,WWW,rete,agente,binding,server,login @@ -217,6 +219,7 @@ X-KDE-Keywords[pl]=Agent użytkownika,Przeglądarka,Internet,WWW,Sieć,agent, powiązania,serwer,login X-KDE-Keywords[pt]=Agente do Utilizador,Navegador,Internet,WWW,Rede,agente,interfaces,servidor,conta X-KDE-Keywords[pt_BR]=Agente do usuário,Navegador,Internet,WWW,Rede,agente,interfaces,servidor,conta +X-KDE-Keywords[ro]=User agent,agent urilizator,navigator,internet,WWW,rețea,agent,legături,server,autentificare X-KDE-Keywords[ru]=User Agent,Browser,Internet,WWW,Network,agent,bindings,server,login,браузер,Интернет,сеть,агент,привязка,сервер,логин,имя пользователя X-KDE-Keywords[sk]=Používateľský agent,Prehliadač,Internet,WWW,Sieť,agent,bindings,server,login X-KDE-Keywords[sl]=Uporabniški posrednik,Brskalnik,Internet,WWW,Omrežje,posrednik,povezave,strežnik,prijava diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/konq/fileappearance.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/konq/fileappearance.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/konq/fileappearance.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/konq/fileappearance.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -196,6 +196,7 @@ Comment[zh_TW]=您可以在這裡設定 Konqueror 做為檔案管理程式的外觀 X-KDE-Keywords=konqueror,filemanager,word wrap,wrap,underline,display,filesize,bytes,font,color,colour +X-KDE-Keywords[bg]=файлове,списък,подчертаване,размер,байтове,шрифт,цвят,konqueror,filemanager,word wrap,wrap,underline,display,filesize,bytes,font,color,colour X-KDE-Keywords[bs]=konqueror,filemanager,word wrap,wrap,underline,display,filesize,bytes,font,color,colour X-KDE-Keywords[ca]=konqueror,gestor de fitxers,ajust de paraules,ajust,subratllat,pantalla,mida de fitxer,bytes,tipus de lletra,color,color X-KDE-Keywords[ca@valencia]=konqueror,gestor de fitxers,ajust de paraules,ajust,subratllat,pantalla,mida de fitxer,bytes,tipus de lletra,color,color @@ -208,6 +209,7 @@ X-KDE-Keywords[fr]=Konqueror, gestionnaire de fichiers, passage à la ligne, sauter, souligner, afficher, taille de fichier, octets, police, couleur, couleur X-KDE-Keywords[ga]=konqueror,bainisteoir comhad,timfhilleadh focal,timfhilleadh,líne faoi,scáileán,méid comhaid,bearta,cló,clófhoireann,dath X-KDE-Keywords[gl]=konqueror,xestor de ficheiros,axuste,salto de palabra,subraiado,pantalla,tamaño do ficheiro,bytes,letra,cor,fonte +X-KDE-Keywords[he]=konqueror,filemanager,word wrap,wrap,underline,display,filesize,bytes,font,color,colour,מנהל קבצים, דפדפן,מילים,קו תחתי, תצוגה , גודל,בצים,גופן,צבע X-KDE-Keywords[hu]=konqueror,fájlkezelő,szótördelés,tördelés,aláhúzás,megjelenítés,fájlméret,bájtok,betűtípus,szín,szín X-KDE-Keywords[ia]=konqueror,gerente de file, torno de parolas, torno,sublinea,monstra,grandor de file,bytes,font,color,color X-KDE-Keywords[it]=konqueror,gestore dei file,a capo automatico,sottolinea,mostra,dimensione dei file,byte,carattere,colore @@ -222,6 +224,7 @@ X-KDE-Keywords[pl]=konqueror,menadżer plików,zawijanie słów,zawijanie,podkreślenie,wyświetlanie,rozmiar pliku, bajty,czcionka,kolor,barwa X-KDE-Keywords[pt]=konqueror,gestor de ficheiros,mudança de linha,mudança,sublinhado,mostrar,tamanho do ficheiro,bytes,tipo de letra,cor X-KDE-Keywords[pt_BR]=konqueror,gerenciador de arquivos,mudança de linha,mudança,sublinhado,mostrar,tamanho do arquivo,bytes,fonte,cor,cores +X-KDE-Keywords[ro]=konqueror,manager fișiere,gestionar de fișiere,word wrap,wrap,limitare dinamică,subliniat,ecran,mărime fișier,dimensiune fișier,octeți,font,culoare,de culoare X-KDE-Keywords[ru]=konqueror,filemanager,word wrap,wrap,underline,display,filesize,bytes,font,color,colour,диспетчер файлов,файловый менеджер,перенос слов,перенос,подчёркивание,размер файла,байты,шрифт,цвет,оттенок X-KDE-Keywords[sk]=konqueror,správca súborov,zalamovanie slov,zalamovanie,podčiarknutie,displej,veľkosť súboru,bajty,písmo,farba,farby X-KDE-Keywords[sl]=konqueror,upravljalnik datotek,prelom vrstice,prelom,podčrtaj,prikaz,velikost datoteke,bajtov,pisava,barva diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/konq/filebehavior.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/konq/filebehavior.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/konq/filebehavior.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/konq/filebehavior.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -196,6 +196,7 @@ Comment[zh_TW]=您可以在這裡設定 Konqueror 做為檔案管理程式的行為 X-KDE-Keywords=konqueror,filemanager,kfm,tips,file tips,separate window,spawn windows,behavior,behaviour,memory usage,Home URL,network operations,progress dialog,trash can,delete,confirmation +X-KDE-Keywords[bg]=файлове,подсказки,прозорци,поведение,памет,използване на памет,кошче, изтриване,потвърждение,konqueror,filemanager,kfm,tips,file tips,separate window,spawn windows,behavior,behaviour,memory usage,Home URL,network operations,progress dialog,trash can,delete,confirmation X-KDE-Keywords[bs]=konqueror,filemanager,kfm,tips,file tips,separate window,spawn windows,behavior,behaviour,memory usage,Home URL,network operations,progress dialog,trash can,delete,confirmation X-KDE-Keywords[ca]=konqueror,gestor de fitxers,kfm,consells,consells de fitxers,finestres separades,finestres engendrades,comportament,ús de memòria,URL inicial,operacions de xarxa,diàleg de progrés,paperera,esborrat,confirmació X-KDE-Keywords[ca@valencia]=konqueror,gestor de fitxers,kfm,consells,consells de fitxers,finestres separades,finestres engendrades,comportament,ús de memòria,URL inicial,operacions de xarxa,diàleg de progrés,paperera,esborrat,confirmació @@ -222,6 +223,7 @@ X-KDE-Keywords[pl]=konqueror,menadżer plików,kfm,tips,podpowiedzi plików, osobne okno,wywołane okna,zachowanie,wykorzystanie pamięci, Domowy adres URL,operacje sieciowe,okno dialogowe postępu,kosz,śmietnik,usuń,potwierdzenie X-KDE-Keywords[pt]=konqueror,gestor de ficheiros,kfm,dicas,dicas do ficheiro,janela separada,janelas recriadas,comportamento,utilização de memória,URL inicial,operações de rede,janela de evolução,caixote do lixo,remoção,confirmação X-KDE-Keywords[pt_BR]=konqueror,gerenciador de arquivos,kfm,dicas,dicas do arquivo,janela separada,janelas recriadas,comportamento,utilização de memória,URL inicial,operações de rede,janela de evolução,lixeira,exclusão,confirmação +X-KDE-Keywords[ro]=konqueror,manager fișiere,gestionar de fișiere,kfm,sfaturi,sfaturi fișiere,ferestre separate,creare ferestre,comportare,comportament,utilizare memorie,URL principal,operații de rețea,dialog de progres,coș de gunoi,șterge,confirmare X-KDE-Keywords[ru]=konqueror,filemanager,kfm,tips,file tips,separate window,spawn windows,behavior,behaviour,memory usage,Home URL,network operations,progress dialog,trash can,delete,confirmation,файловый менеджер,диспетчер файлов,советы,отдельное окно,поведение,использование памяти,путь к домашней папке,сетевые операции,ход выполнения,корзина,удалить,подтверждение X-KDE-Keywords[sk]=konqueror,správca súborov,kfm,tipy,súborové tipy,oddelené okno,spawn okná,správanie,chovanie,využitie pamäte,Domovská URL,sieťové operácie,dialóg postupu,kôš,vymazať,potvrdenie X-KDE-Keywords[sl]=konqueror,upravljalnik datotek,kfm,namigi,namigi datotek,ločeno okno,odpri okno,obnašanje,uporaba pomnilnika,domač naslov URL,dejanja omrežja,pogovorno okno napredka,smeti,izbris,potrditev diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/konq/webappearance.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/konq/webappearance.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/konq/webappearance.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/konq/webappearance.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -197,6 +197,7 @@ Comment[zh_TW]=您可以在這裡設定 Konqueror 做為檔案管理程式的外觀 X-KDE-Keywords=konqueror,filemanager,word wrap,wrap,underline,display,filesize,bytes,font,color,colour +X-KDE-Keywords[bg]=файлове,списък,подчертаване,размер,байтове,шрифт,цвят,konqueror,filemanager,word wrap,wrap,underline,display,filesize,bytes,font,color,colour X-KDE-Keywords[bs]=konqueror,filemanager,word wrap,wrap,underline,display,filesize,bytes,font,color,colour X-KDE-Keywords[ca]=konqueror,gestor de fitxers,ajust de paraules,ajust,subratllat,pantalla,mida de fitxer,bytes,tipus de lletra,color,color X-KDE-Keywords[ca@valencia]=konqueror,gestor de fitxers,ajust de paraules,ajust,subratllat,pantalla,mida de fitxer,bytes,tipus de lletra,color,color @@ -209,6 +210,7 @@ X-KDE-Keywords[fr]=Konqueror, gestionnaire de fichiers, passage à la ligne, sauter, souligner, afficher, taille de fichier, octets, police, couleur, couleur X-KDE-Keywords[ga]=konqueror,bainisteoir comhad,timfhilleadh focal,timfhilleadh,líne faoi,scáileán,méid comhaid,bearta,cló,clófhoireann,dath X-KDE-Keywords[gl]=konqueror,xestor de ficheiros,axuste,salto de palabra,subraiado,pantalla,tamaño do ficheiro,bytes,letra,cor,fonte +X-KDE-Keywords[he]=konqueror,filemanager,word wrap,wrap,underline,display,filesize,bytes,font,color,colour,מנהל קבצים, דפדפן,מילים,קו תחתי, תצוגה , גודל,בצים,גופן,צבע X-KDE-Keywords[hu]=konqueror,fájlkezelő,szótördelés,tördelés,aláhúzás,megjelenítés,fájlméret,bájtok,betűtípus,szín,szín X-KDE-Keywords[ia]=konqueror,gerente de file, torno de parolas, torno,sublinea,monstra,grandor de file,bytes,font,color,color X-KDE-Keywords[it]=konqueror,gestore dei file,a capo automatico,sottolinea,mostra,dimensione dei file,byte,carattere,colore @@ -223,6 +225,7 @@ X-KDE-Keywords[pl]=konqueror,menadżer plików,zawijanie słów,zawijanie,podkreślenie,wyświetlanie,rozmiar pliku, bajty,czcionka,kolor,barwa X-KDE-Keywords[pt]=konqueror,gestor de ficheiros,mudança de linha,mudança,sublinhado,mostrar,tamanho do ficheiro,bytes,tipo de letra,cor X-KDE-Keywords[pt_BR]=konqueror,gerenciador de arquivos,mudança de linha,mudança,sublinhado,mostrar,tamanho do arquivo,bytes,fonte,cor,cores +X-KDE-Keywords[ro]=konqueror,manager fișiere,gestionar de fișiere,word wrap,wrap,limitare dinamică,subliniat,ecran,mărime fișier,dimensiune fișier,octeți,font,culoare,de culoare X-KDE-Keywords[ru]=konqueror,filemanager,word wrap,wrap,underline,display,filesize,bytes,font,color,colour,диспетчер файлов,файловый менеджер,перенос слов,перенос,подчёркивание,размер файла,байты,шрифт,цвет,оттенок X-KDE-Keywords[sk]=konqueror,správca súborov,zalamovanie slov,zalamovanie,podčiarknutie,displej,veľkosť súboru,bajty,písmo,farba,farby X-KDE-Keywords[sl]=konqueror,upravljalnik datotek,prelom vrstice,prelom,podčrtaj,prikaz,velikost datoteke,bajtov,pisava,barva diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/konq/webbehavior.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/konq/webbehavior.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/konq/webbehavior.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/konq/webbehavior.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -197,6 +197,7 @@ Comment[zh_TW]=您可以在這裡設定 Konqueror 做為檔案管理程式的行為 X-KDE-Keywords=konqueror,filemanager,kfm,tips,file tips,separate window,spawn windows,behavior,behaviour,memory usage,Home URL, +X-KDE-Keywords[bg]=файлове,подсказки,прозорци,поведение,памет,използвана памет,konqueror,filemanager,kfm,tips,file tips,separate window,spawn windows,behavior,behaviour,memory usage,Home URL, X-KDE-Keywords[bs]=konqueror,filemanager,kfm,tips,file tips,separate window,spawn windows,behavior,behaviour,memory usage,Home URL, X-KDE-Keywords[ca]=konqueror,gestor de fitxers,kfm,consells,consells de fitxer,finestres separades,finestres engendrades,comportament,ús de memòria,URL inicial X-KDE-Keywords[ca@valencia]=konqueror,gestor de fitxers,kfm,consells,consells de fitxer,finestres separades,finestres engendrades,comportament,ús de memòria,URL inicial @@ -223,6 +224,7 @@ X-KDE-Keywords[pl]=konqueror,menadżer plików,kfm,podpowiedzi,podpowiedzi plików, osobne okna,wywołane okna,zachowanie,wykorzystanie pamięci,Domowy adres URL, X-KDE-Keywords[pt]=konqueror,gestor de ficheiros,kfm,dicas,dicas de ficheiros,janela separada,janelas recriadas,comportamento,utilização de memória,URL inicial, X-KDE-Keywords[pt_BR]=konqueror,gerenciador de arquivos,kfm,dicas,dicas de arquivos,janela separada,janelas recriadas,comportamento,utilização de memória,URL inicial, +X-KDE-Keywords[ro]=konqueror,manager de fișiere,gestionar de fișiere,kfm,sfaturi,sfaturi fișiere,separă fereastra,creare ferestre,comportare,comportament,utilizare memorie,URL principal, X-KDE-Keywords[ru]=konqueror,filemanager,kfm,tips,file tips,separate window,spawn windows,behavior,behaviour,memory usage,Home URL,файловый менеджер,диспетчер файлов,советы,отдельное окно,поведение,использование памяти,путь к домашней папке X-KDE-Keywords[sk]=konqueror,správca súborov,kfm,tipy,súborové tipy,oddelené okno,spawn okná,správanie,chovanie,využitie pamäte,Domovská URL, X-KDE-Keywords[sl]=konqueror,upravljalnik datotek,kfm,namigi datotek,ločeno okno,odpri okna,obnašanje,uporaba pomnilnika,domač naslov URL diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/konqhtml/css/kcmcss.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/konqhtml/css/kcmcss.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/konqhtml/css/kcmcss.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/konqhtml/css/kcmcss.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -195,6 +195,7 @@ Comment[zh_TW]=設定用來顯示網頁的樣式表單 X-KDE-Keywords=CSS,HTML,style,stylesheet,accessibility +X-KDE-Keywords[bg]=стил,каскаден стил,достъпност,CSS,HTML,style,stylesheet,accessibility X-KDE-Keywords[bs]=CSS,HTML,style,stylesheet,accessibility X-KDE-Keywords[ca]=CSS,HTML,estil,fulles d'estil,accessibilitat X-KDE-Keywords[ca@valencia]=CSS,HTML,estil,fulles d'estil,accessibilitat @@ -207,6 +208,7 @@ X-KDE-Keywords[fr]=CSS, HTML, style, feuille de style, accessibilité X-KDE-Keywords[ga]=CSS,HTML,stíl,stílbhileog,inrochtaineacht X-KDE-Keywords[gl]=CSS,HTML,estilo,folla de estilos,accesibilidade +X-KDE-Keywords[he]=CSS,HTML,style,stylesheet,accessibility,סגנון,שימושיות X-KDE-Keywords[hu]=CSS,HTML,stílus,stíluslap,akadálymentesítés X-KDE-Keywords[ia]=CSS,HTML,stilo,folio de stilo,accessibilitate X-KDE-Keywords[it]=CSS,HTML,stile,foglio di stile,accessibilità @@ -221,6 +223,7 @@ X-KDE-Keywords[pl]=CSS,HTML,styl,arkusz stylów,dostępność X-KDE-Keywords[pt]=CSS,HTML,estilo,stylesheet,folha de estilo,acessibilidade X-KDE-Keywords[pt_BR]=CSS,HTML,estilo,planilha,folha de estilo,acessibilidade +X-KDE-Keywords[ro]=CSS,HTML,stil,foaie de stiluri,accesibilitate X-KDE-Keywords[ru]=CSS,HTML,style,stylesheet,accessibility,стиль,таблица стилей,специальные возможности X-KDE-Keywords[sk]=CSS,HTML,štýl,stylesheet,prístupnosť X-KDE-Keywords[sl]=CSS,HTML,slog,slogovna predloga,dostopnost diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/konqhtml/khtml_appearance.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/konqhtml/khtml_appearance.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/konqhtml/khtml_appearance.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/konqhtml/khtml_appearance.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -177,6 +177,7 @@ Comment[zh_CN]=配置如何显示网页 Comment[zh_TW]=設定如何顯示網頁 X-KDE-Keywords=konqueror,kfm,browser,html,web,www,fonts,charsets,character sets,encoding +X-KDE-Keywords[bg]=браузър,уеб,шрифт,кодировка,konqueror,kfm,browser,html,web,www,fonts,charsets,character sets,encoding X-KDE-Keywords[bs]=konqueror,kfm,browser,html,web,www,fonts,charsets,character sets,encoding X-KDE-Keywords[ca]=konqueror,kfm,navegador,html,web,www,tipus de lletres,joc de caràcters,jocs de caràcters,codificació X-KDE-Keywords[ca@valencia]=konqueror,kfm,navegador,html,web,www,tipus de lletres,joc de caràcters,jocs de caràcters,codificació @@ -203,6 +204,7 @@ X-KDE-Keywords[pl]=konqueror,kfm,przeglądarka,html,sieć,www,czcionki,zestawy znaków,kodowanie X-KDE-Keywords[pt]=konqueror,kfm,navegador,HTML,Web,WWW,tipos de letra,codificações,codificações de caracteres,codificação X-KDE-Keywords[pt_BR]=konqueror,kfm,navegador,html,web,www,fontes,codificações,codificações de caracteres,codificação +X-KDE-Keywords[ro]=konqueror,kfm,navigator,html,web,www,fonturi,set de caractere,seturi de caractere,codare X-KDE-Keywords[ru]=konqueror,kfm,browser,html,web,www,fonts,charsets,character sets,encoding,браузер,веб,шрифты,кодировки,наборы символов,кодирование X-KDE-Keywords[sk]=konqueror,kfm,prehliadač,html,web,www,písma,znakové sady,sady znakov,kódovanie X-KDE-Keywords[sl]=konqueror,kfm,brskalnik,html,splet,www.pisave,nabori znakov,kodiranje diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/konqhtml/khtml_behavior.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/konqhtml/khtml_behavior.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/konqhtml/khtml_behavior.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/konqhtml/khtml_behavior.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -193,6 +193,7 @@ Comment[zh_CN]=配置浏览器行为 Comment[zh_TW]=設定瀏覽器行為 X-KDE-Keywords=konqueror,kfm,browser,html,web,www,fonts,colours,colors,java,javascript,cursor,links,images,charsets,character sets,encoding +X-KDE-Keywords[bg]=браузър,уеб,шрифт,цвят,курсор,кодировка,изображение,скрипт,konqueror,kfm,browser,html,web,www,fonts,colours,colors,java,javascript,cursor,links,images,charsets,character sets,encoding X-KDE-Keywords[bs]=konqueror,kfm,browser,html,web,www,fonts,colours,colors,java,javascript,cursor,links,images,charsets,character sets,encoding X-KDE-Keywords[ca]=konqueror,kfm,navegador,html,web,www,tipus de lletres,colors,colors,java,javascript,cursor,enllaços,imatges,joc de caràcters,joc de caràcters,codificació X-KDE-Keywords[ca@valencia]=konqueror,kfm,navegador,html,web,www,tipus de lletres,colors,colors,java,javascript,cursor,enllaços,imatges,joc de caràcters,joc de caràcters,codificació @@ -219,6 +220,7 @@ X-KDE-Keywords[pl]=konqueror,kfm,przeglądarka,html,sieć,www,czcionki,kolory,barwy,java,javascript,kursor,odnośniki,obrazy,zestawy znaków,kodowanie X-KDE-Keywords[pt]=konqueror,kfm,navegador,HTML,Web,WWW,cores,Java,Javascript,cursor,ligações,imagens,codificações,codificações de caracteres,codificação X-KDE-Keywords[pt_BR]=konqueror,kfm,navegador,html,web,www,fontes,cores,java,javascript,cursor,links,imagens,codificações,codificações de caracteres,codificação +X-KDE-Keywords[ro]=konqueror,kfm,navigator,html,web,www,fonturi,culori,culori,java,javascript,cursor,legături,imagini,set de caractere,seturi de caractere,codare X-KDE-Keywords[ru]=konqueror,kfm,browser,html,web,www,fonts,colours,colors,java,javascript,cursor,links,images,charsets,character sets,encoding,браузер,веб,шрифты,цвета,оттенки,курсор,ссылки,изображения,кодировки,наборы символов,кодирование X-KDE-Keywords[sk]=konqueror,kfm,prehliadač,html,web,www,písma,farba,farby,java,javascript,kurzor,odkazy,obrázky,znakové sady,sady znakov,kódovanie X-KDE-Keywords[sl]=konqueror,kfm,brskalnik,html,splet,www,pisave,barve,java,javascript,kazalka,povezave,slike,nabori znakov,kodiranje diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/konqhtml/khtml_general.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/konqhtml/khtml_general.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/konqhtml/khtml_general.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/konqhtml/khtml_general.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -162,6 +162,7 @@ Comment[zh_CN]=配置 Konqueror 的常规行为 Comment[zh_TW]=設定 Konqueror 一般行為 X-KDE-Keywords=konqueror,tabs +X-KDE-Keywords[bg]=подпрозорци,konqueror,tabs X-KDE-Keywords[bs]=konqueror,tabs X-KDE-Keywords[ca]=konqueror,pestanyes X-KDE-Keywords[ca@valencia]=konqueror,pestanyes @@ -175,8 +176,10 @@ X-KDE-Keywords[fr]=konqueror, onglets X-KDE-Keywords[ga]=Konqueror,cluaisíní X-KDE-Keywords[gl]=konqueror,lapelas +X-KDE-Keywords[he]=konqueror,tabs X-KDE-Keywords[hu]=konqueror,lapok X-KDE-Keywords[ia]=konqueror,schedas +X-KDE-Keywords[is]=konqueror,flipar X-KDE-Keywords[it]=konqueror,schede X-KDE-Keywords[kk]=konqueror,tabs X-KDE-Keywords[km]=konqueror ផ្ទាំង @@ -191,6 +194,7 @@ X-KDE-Keywords[pl]=konqueror,karty X-KDE-Keywords[pt]=konqueror,páginas X-KDE-Keywords[pt_BR]=konqueror,abas +X-KDE-Keywords[ro]=konqueror,file X-KDE-Keywords[ru]=konqueror,tabs,вкладки X-KDE-Keywords[sk]=konqueror,karty X-KDE-Keywords[sl]=konqueror,zavihki diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/konqhtml/khtml_java_js.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/konqhtml/khtml_java_js.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/konqhtml/khtml_java_js.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/konqhtml/khtml_java_js.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -109,7 +109,7 @@ Comment[ast]=Configuración del comportamientu de Java y JavaScript Comment[be]=Настаўленні Java і JavaScript Comment[be@latin]=Naładź pavodziny hartača dla prahramaŭ Java i JavaScript -Comment[bg]=Настройване на Java и JavaScript +Comment[bg]=Настройки на Java и JavaScript Comment[bn]=জাভা এবং জাভাস্ক্রিপ্ট-এর আচরণ কনফিগার করুন Comment[bn_IN]=Java ও JavaScript-র আচরণ কনফিগার করুন Comment[br]=Kefluniañ emzalc'h Java ha JavaScript @@ -195,9 +195,11 @@ Comment[zh_CN]=配置 Java 和 JavaScript 的行为 Comment[zh_TW]=設定 Java 與 JavaScript 的行為 X-KDE-Keywords=konqueror,kfm,browser,html,web,www,java,javascript +X-KDE-Keywords[bg]=браузър,уеб,скрипт,konqueror,kfm,browser,html,web,www,java,javascript X-KDE-Keywords[bs]=konqueror,kfm,browser,html,web,www,java,javascript X-KDE-Keywords[ca]=konqueror,kfm,navegador,html,web,www,java,javascript X-KDE-Keywords[ca@valencia]=konqueror,kfm,navegador,html,web,www,java,javascript +X-KDE-Keywords[cs]=konqueror,kfm,prohlížeč,html,web,www,java,javascript X-KDE-Keywords[da]=konqueror,kfm,browser,html,web,www,java,javascript X-KDE-Keywords[de]=Konqueror,kfm,Browser,HTML,Web,WWW,Java,JavaScript X-KDE-Keywords[el]=konqueror,kfm,περιηγητής,html,ιστός,www,java,javascript @@ -221,6 +223,7 @@ X-KDE-Keywords[pl]=konqueror,kfm,przeglądarka,html,sieć,www,java,javascript X-KDE-Keywords[pt]=konqueror,kfm,navegador,HTML,Web,WWW,Java,Javascript X-KDE-Keywords[pt_BR]=konqueror,kfm,navegador,html,web,www,java,javascript +X-KDE-Keywords[ro]=konqueror,kfm,navigator,html,web,www,java,javascript X-KDE-Keywords[ru]=konqueror,kfm,browser,html,web,www,java,javascript,браузер,веб X-KDE-Keywords[sk]=konqueror,kfm,prehliadač,html,web,www,java,javascript X-KDE-Keywords[sl]=konqueror,kfm,brskalnik,html,splet,www,java,javascript diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/performance/kcmkonqyperformance.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/performance/kcmkonqyperformance.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/performance/kcmkonqyperformance.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/performance/kcmkonqyperformance.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -192,6 +192,7 @@ Comment[zh_TW]=可增進 Konqueror 效能的設定 X-KDE-Keywords=konqueror,reuse,preloading +X-KDE-Keywords[bg]=зареждане,предварително,konqueror,reuse,preloading X-KDE-Keywords[bs]=konqueror,reuse,preloading X-KDE-Keywords[ca]=konqueror,tornar a usar,precàrrega X-KDE-Keywords[ca@valencia]=konqueror,tornar a usar,precàrrega @@ -204,6 +205,7 @@ X-KDE-Keywords[fr]=konqueror, ré-utiliser, préchargement X-KDE-Keywords[ga]=konqueror,athúsáid,réamhluchtú X-KDE-Keywords[gl]=konqueror,reutilización,precarga +X-KDE-Keywords[he]=konqueror,reuse,preloading,מחדש,שימוש מחדש, טעינה X-KDE-Keywords[hu]=konqueror,újrafelhasználás,gyorsbetöltés X-KDE-Keywords[ia]=konqueror,reusa,precargante X-KDE-Keywords[it]=konqueror,riuso,precaricatore @@ -220,6 +222,7 @@ X-KDE-Keywords[pl]=konqueror,ponowne wykorzystanie,wstępne wczytywanie X-KDE-Keywords[pt]=konqueror,reutilizar,pré-carregamento X-KDE-Keywords[pt_BR]=konqueror,reutilizar,pré-carregamento +X-KDE-Keywords[ro]=konqueror,reutilizare,preîncărcare X-KDE-Keywords[ru]=konqueror,reuse,предварительная загрузка,повторное использование X-KDE-Keywords[sk]=konqueror,reuse,prednačítanie X-KDE-Keywords[sl]=konqueror,ponovno uporabi,prednalaganje diff -Nru netrunner-desktop-containment-4.11.1/konqueror/settings/performance/kcmperformance.desktop netrunner-desktop-containment-4.13.0/konqueror/settings/performance/kcmperformance.desktop --- netrunner-desktop-containment-4.11.1/konqueror/settings/performance/kcmperformance.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/settings/performance/kcmperformance.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -191,9 +191,11 @@ Comment[zh_TW]=可增進 KDE 效能的設定 X-KDE-Keywords=performance,speed,memory,improve +X-KDE-Keywords[bg]=производителност,скорост,памет,подобряване,performance,speed,memory,improve X-KDE-Keywords[bs]=performance,speed,memory,improve X-KDE-Keywords[ca]=rendiment,velocitat,memòria,millora X-KDE-Keywords[ca@valencia]=rendiment,velocitat,memòria,millora +X-KDE-Keywords[cs]=výkon,rychlost,paměť,vylepšit X-KDE-Keywords[da]=ydelse,hastighed,hukommelse,forbedr X-KDE-Keywords[de]=Leistung,Geschwindigkeit,Speicher,optimieren,verbessern X-KDE-Keywords[el]=απόδοση,ταχύτητα,μνήμη,βελτίωση @@ -218,6 +220,7 @@ X-KDE-Keywords[pl]=wydajność,szybkość,prędkość,pamięć,ulepszenie X-KDE-Keywords[pt]=performance,velocidade,memória,melhoria X-KDE-Keywords[pt_BR]=desempenho,velocidade,memória,melhoria +X-KDE-Keywords[ro]=performanță,viteză,memorie,îmbunătățire X-KDE-Keywords[ru]=performance,speed,memory,improve,быстродействие,производительность,скорость,память,улучшение X-KDE-Keywords[sk]=výkon,rýchlosť,pamäť,zlepšenie X-KDE-Keywords[sl]=zmogljivost,hitrost,pomnilnik,izboljšanje diff -Nru netrunner-desktop-containment-4.11.1/konqueror/sidebar/default_entries/bookmarks.desktop netrunner-desktop-containment-4.13.0/konqueror/sidebar/default_entries/bookmarks.desktop --- netrunner-desktop-containment-4.11.1/konqueror/sidebar/default_entries/bookmarks.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/sidebar/default_entries/bookmarks.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -160,7 +160,7 @@ Comment[pl]=To jest lista zakładek, dla szybszego dostępu Comment[pt]=Os seus favoritos, para um acesso mais rápido Comment[pt_BR]=Esta é a lista dos seus favoritos, para um acesso mais rápido -Comment[ro]=Aceasta este lista semnelor dumneavoastră de carte +Comment[ro]=Aceasta este lista semnelor dumneavoastră de carte, pentru acces mai rapid Comment[ru]=Список закладок для быстрого доступа Comment[se]=Dát leat du girjemearkkat, álkibut gávdnat Comment[si]=මෙය වේගවත් පිවිසුමක් සඳහා පොත්සලකුණු ලැයිස්තුවකි diff -Nru netrunner-desktop-containment-4.11.1/konqueror/sidebar/default_entries/history.desktop netrunner-desktop-containment-4.13.0/konqueror/sidebar/default_entries/history.desktop --- netrunner-desktop-containment-4.11.1/konqueror/sidebar/default_entries/history.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/sidebar/default_entries/history.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -85,7 +85,7 @@ Name[tg]=Таърих Name[th]=ประวัติการใช้ Name[tr]=Geçmiş -Name[ug]=تارىخ +Name[ug]=ئىز Name[uk]=Журнал Name[uz]=Tarix Name[uz@cyrillic]=Тарих diff -Nru netrunner-desktop-containment-4.11.1/konqueror/sidebar/default_entries/places.desktop netrunner-desktop-containment-4.13.0/konqueror/sidebar/default_entries/places.desktop --- netrunner-desktop-containment-4.11.1/konqueror/sidebar/default_entries/places.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/sidebar/default_entries/places.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -95,7 +95,7 @@ Comment[fi]=Tämä on luettelo sijainneista. Comment[fr]=Ceci est la liste des emplacements. Comment[ga]=Seo é an liosta d'áiteanna. -Comment[gl]=Esta é a lista de lugares. +Comment[gl]=Esta é a lista de lugares. Comment[gu]=આ જગ્યાઓની યાદી છે Comment[he]=זוהי רשימת המקומות. Comment[hi]=यह स्थानों की सूची है diff -Nru netrunner-desktop-containment-4.11.1/konqueror/sidebar/history_module/kcmhistory.desktop netrunner-desktop-containment-4.13.0/konqueror/sidebar/history_module/kcmhistory.desktop --- netrunner-desktop-containment-4.11.1/konqueror/sidebar/history_module/kcmhistory.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/sidebar/history_module/kcmhistory.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -91,7 +91,7 @@ Name[tg]=Таърих Name[th]=ประวัติการใช้ Name[tr]=Geçmiş -Name[ug]=تارىخ +Name[ug]=ئىز Name[uk]=Журнал Name[uz]=Tarix Name[uz@cyrillic]=Тарих @@ -193,9 +193,11 @@ Comment[zh_CN]=配置历史侧边栏 Comment[zh_TW]=設定歷史紀錄邊列 X-KDE-Keywords=history,expire +X-KDE-Keywords[bg]=история,изтичане,history,expire X-KDE-Keywords[bs]=history,expire X-KDE-Keywords[ca]=historial,expira X-KDE-Keywords[ca@valencia]=historial,expira +X-KDE-Keywords[cs]=historie,vypršet X-KDE-Keywords[da]=historik,udløb X-KDE-Keywords[de]=History,Verlauf,veralten,ablaufen X-KDE-Keywords[el]=ιστορικό,λήξη @@ -205,6 +207,7 @@ X-KDE-Keywords[fr]=historique, expiration X-KDE-Keywords[ga]=stair,caite,as feidhm,téigh as feidhm X-KDE-Keywords[gl]=historial,caducar,expirar +X-KDE-Keywords[he]=history,expire,היסטוריה,תפוגה,פג,זמן X-KDE-Keywords[hu]=előzmények,lejárat X-KDE-Keywords[ia]=historia,expira X-KDE-Keywords[it]=cronologia,scadenza @@ -220,6 +223,7 @@ X-KDE-Keywords[pl]=historia,wygaśnięcie X-KDE-Keywords[pt]=histórico,expiração X-KDE-Keywords[pt_BR]=histórico,expiração +X-KDE-Keywords[ro]=istoric,expirare X-KDE-Keywords[ru]=history,expire,журнал,история,устаревание X-KDE-Keywords[sk]=história,expirácia X-KDE-Keywords[sl]=zgodovina,poteče diff -Nru netrunner-desktop-containment-4.11.1/konqueror/sidebar/trees/init/bookmarks_module.desktop netrunner-desktop-containment-4.13.0/konqueror/sidebar/trees/init/bookmarks_module.desktop --- netrunner-desktop-containment-4.11.1/konqueror/sidebar/trees/init/bookmarks_module.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/sidebar/trees/init/bookmarks_module.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -160,7 +160,7 @@ Comment[pl]=To jest lista zakładek, dla szybszego dostępu Comment[pt]=Os seus favoritos, para um acesso mais rápido Comment[pt_BR]=Esta é a lista dos seus favoritos, para um acesso mais rápido -Comment[ro]=Aceasta este lista semnelor dumneavoastră de carte +Comment[ro]=Aceasta este lista semnelor dumneavoastră de carte, pentru acces mai rapid Comment[ru]=Список закладок для быстрого доступа Comment[se]=Dát leat du girjemearkkat, álkibut gávdnat Comment[si]=මෙය වේගවත් පිවිසුමක් සඳහා පොත්සලකුණු ලැයිස්තුවකි diff -Nru netrunner-desktop-containment-4.11.1/konqueror/src/konqmain.cpp netrunner-desktop-containment-4.13.0/konqueror/src/konqmain.cpp --- netrunner-desktop-containment-4.11.1/konqueror/src/konqmain.cpp 2014-01-02 18:48:32.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/src/konqmain.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -24,7 +24,6 @@ #include "konqsessionmanager.h" #include "konqview.h" #include "konqsettingsxt.h" -#include "kprocess.h" #include #include @@ -225,20 +224,6 @@ } args->clear(); - // Kubuntu FIX: Execute nspluginscan if available, so that users won't have - // to run it manually (see LP: #349728) - KProcess nspluginscan; - nspluginscan.setOutputChannelMode(KProcess::SeparateChannels); - QString scanExe = KGlobal::dirs()->findExe("nspluginscan"); - if (scanExe.isEmpty()) { - kDebug() << "can't find nspluginviewer"; - } - // start nspluginscan - nspluginscan << scanExe; - kDebug() << "Running nspluginscan"; - nspluginscan.start(); - - app.exec(); // Delete all KonqMainWindows, so that we don't have diff -Nru netrunner-desktop-containment-4.11.1/konqueror/src/konqmainwindow.cpp netrunner-desktop-containment-4.13.0/konqueror/src/konqmainwindow.cpp --- netrunner-desktop-containment-4.11.1/konqueror/src/konqmainwindow.cpp 2014-01-02 18:48:32.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/src/konqmainwindow.cpp 2014-05-26 15:31:27.000000000 +0000 @@ -5035,7 +5035,7 @@ // Create a KToggleAction for each view mode, and plug it into the menu KToggleAction* action = new KToggleAction(KIcon(serviceAction.icon()), serviceAction.text(), this); //actionCollection()->addAction(desktopEntryName /*not unique!*/, action); - action->setObjectName(desktopEntryName); + action->setObjectName(desktopEntryName + QLatin1String("-viewmode")); action->setData(QVariant(serviceAction.name())); action->setActionGroup(m_viewModesGroup); m_viewModeMenu->menu()->addAction(action); diff -Nru netrunner-desktop-containment-4.11.1/konqueror/src/konqundomanager.cpp netrunner-desktop-containment-4.13.0/konqueror/src/konqundomanager.cpp --- netrunner-desktop-containment-4.11.1/konqueror/src/konqundomanager.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/src/konqundomanager.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -130,7 +130,7 @@ KonqClosedItem* closedItem = m_closedItemList.first(); // Check what to undo - if (!m_supportsFileUndo || !KIO::FileUndoManager::self()->undoAvailable() || closedItem->serialNumber() > fileUndoManager->currentCommandSerialNumber()) { + if (!m_supportsFileUndo || !fileUndoManager->undoAvailable() || closedItem->serialNumber() > fileUndoManager->currentCommandSerialNumber()) { undoClosedItem(0); return; } @@ -209,13 +209,13 @@ if(closedTabItem) emit openClosedTab(*closedTabItem); else if(closedRemoteWindowItem) { - emit openClosedWindow(*closedRemoteWindowItem); KonqClosedWindowsManager::self()->removeClosedWindowItem(this, closedRemoteWindowItem); + emit openClosedWindow(*closedRemoteWindowItem); } else if(closedWindowItem) { - emit openClosedWindow(*closedWindowItem); KonqClosedWindowsManager::self()->removeClosedWindowItem(this, closedWindowItem); + emit openClosedWindow(*closedWindowItem); closedWindowItem->configGroup().deleteGroup(); - + // Save config so that this window won't appear in new konqueror processes KonqClosedWindowsManager::self()->saveConfig(); } diff -Nru netrunner-desktop-containment-4.11.1/konqueror/src/tests/filemanagement.old.profile netrunner-desktop-containment-4.13.0/konqueror/src/tests/filemanagement.old.profile --- netrunner-desktop-containment-4.11.1/konqueror/src/tests/filemanagement.old.profile 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/konqueror/src/tests/filemanagement.old.profile 2014-05-26 15:31:22.000000000 +0000 @@ -11,7 +11,7 @@ Name[ast]=Xestión de ficheros Name[be]=Кіраванне файламі Name[be@latin]=Kiravańnie fajłami -Name[bg]=File Management +Name[bg]=Управление на файл Name[bn]=ফাইল ব্যবস্থাপনা Name[bn_IN]=ফাইল পরিচালনা Name[br]=Mererezh ar restroù diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/favicons/favicons.cpp netrunner-desktop-containment-4.13.0/lib/konq/favicons/favicons.cpp --- netrunner-desktop-containment-4.11.1/lib/konq/favicons/favicons.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/favicons/favicons.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -40,6 +40,7 @@ #include +static int dfavi() { static int s_area = KDebug::registerArea("FavIcons", false); return s_area; } K_PLUGIN_FACTORY(FavIconsFactory, registerPlugin(); @@ -148,7 +149,7 @@ if (url.host().isEmpty()) return QString(); - //kDebug() << url; + //kDebug(dfavi()) << url; const QString simplifiedURL = removeSlash(simplifyURL(url)); QString *iconURL = d->faviconsCache[simplifiedURL]; @@ -161,7 +162,7 @@ icon = QLatin1String("favicons/") + icon; - kDebug() << "URL:" << url << "ICON:" << icon; + kDebug(dfavi()) << "URL:" << url << "ICON:" << icon; if (QFile::exists(d->faviconsDir+icon+QLatin1String(".png"))) return icon; @@ -173,17 +174,17 @@ { KDE_struct_stat st; if (KDE::stat(QFile::encodeName(icon), &st) != 0) { - //kDebug() << "isIconOld" << icon << "yes, no such file"; + //kDebug(dfavi()) << "isIconOld" << icon << "yes, no such file"; return true; // Trigger a new download on error } - //kDebug() << "isIconOld" << icon << "?"; + //kDebug(dfavi()) << "isIconOld" << icon << "?"; return (time(0) - st.st_mtime) > 604800; // arbitrary value (one week) } void FavIconsModule::setIconForUrl(const KUrl &url, const KUrl &iconURL) { - //kDebug() << url << iconURL; + //kDebug(dfavi()) << url << iconURL; const QString simplifiedURL = simplifyURL(url); d->faviconsCache.insert(removeSlash(simplifiedURL), new QString(iconURL.url()) ); @@ -192,7 +193,7 @@ const QString iconFile = d->faviconsDir + iconName + QLatin1String(".png"); if (!isIconOld(iconFile)) { - //kDebug() << "emit iconChanged" << false << url << iconName; + //kDebug(dfavi()) << "emit iconChanged" << false << url << iconName; emit iconChanged(false, url.url(), iconName); return; } @@ -202,10 +203,10 @@ void FavIconsModule::downloadHostIcon(const KUrl &url) { - //kDebug() << url; + //kDebug(dfavi()) << url; const QString iconFile = d->faviconsDir + QLatin1String("favicons/") + url.host() + QLatin1String(".png"); if (!isIconOld(iconFile)) { - //kDebug() << "not old -> doing nothing"; + //kDebug(dfavi()) << "not old -> doing nothing"; return; } startDownload(url.host(), true, KUrl(url, QLatin1String("/favicon.ico"))); @@ -213,7 +214,7 @@ void FavIconsModule::forceDownloadHostIcon(const KUrl &url) { - //kDebug() << url; + //kDebug(dfavi()) << url; KUrl iconURL = KUrl(url, QLatin1String("/favicon.ico")); d->failedDownloads.removeAll(iconURL); // force a download to happen startDownload(url.host(), true, iconURL); @@ -222,12 +223,12 @@ void FavIconsModule::startDownload(const QString &hostOrURL, bool isHost, const KUrl &iconURL) { if (d->failedDownloads.contains(iconURL)) { - //kDebug() << iconURL << "already in failedDownloads, emitting error"; + //kDebug(dfavi()) << iconURL << "already in failedDownloads, emitting error"; emit error(isHost, hostOrURL, i18n("No favicon found")); return; } - //kDebug() << iconURL; + //kDebug(dfavi()) << iconURL; KIO::Job *job = KIO::get(iconURL, KIO::NoReload, KIO::HideProgressInfo); job->addMetaData(d->metaData); connect(job, SIGNAL(data(KIO::Job*,QByteArray)), SLOT(slotData(KIO::Job*,QByteArray))); @@ -247,7 +248,7 @@ // Size limit. Stop downloading if the file is huge. // Testcase (as of june 2008, at least): http://planet-soc.com/favicon.ico, 136K and strange format. if (oldSize > 0x10000) { - kDebug() << "Favicon too big, aborting download of" << tjob->url(); + kDebug(dfavi()) << "Favicon too big, aborting download of" << tjob->url(); d->killJobs.append(job); QTimer::singleShot(0, this, SLOT(slotKill())); const KUrl iconURL = tjob->url(); @@ -295,11 +296,11 @@ errorMessage = job->errorString(); } if (iconName.isEmpty()) { - //kDebug() << "adding" << iconURL << "to failed downloads"; + //kDebug(dfavi()) << "adding" << iconURL << "to failed downloads"; d->failedDownloads.append(iconURL); emit error(download.isHost, download.hostOrURL, errorMessage); } else { - //kDebug() << "emit iconChanged" << download.isHost << download.hostOrURL << iconName; + //kDebug(dfavi()) << "emit iconChanged" << download.isHost << download.hostOrURL << iconName; emit iconChanged(download.isHost, download.hostOrURL, iconName); } } @@ -311,7 +312,7 @@ void FavIconsModule::slotKill() { - //kDebug(); + //kDebug(dfavi()); Q_FOREACH(KIO::Job* job, d->killJobs) { job->kill(); } diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/konq_operations.cpp netrunner-desktop-containment-4.13.0/lib/konq/konq_operations.cpp --- netrunner-desktop-containment-4.11.1/lib/konq/konq_operations.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/konq_operations.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -74,6 +74,8 @@ #include #include +static const KCatalogLoader loader("libkonq"); + KonqOperations::KonqOperations( QWidget *parent ) : QObject( parent ), m_method( UNKNOWN ), m_info(0), m_pasteInfo(0) diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/CDROM-Device.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/CDROM-Device.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/CDROM-Device.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/CDROM-Device.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -89,7 +89,7 @@ Name[tg]=Баровардан Name[th]=เอาแผ่นสื่อออก Name[tr]=Çıkart -Name[ug]=قاڭقىت +Name[ug]=چىقار Name[uk]=Виштовхнути Name[uz]=Chiqarish Name[uz@cyrillic]=Чиқариш diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/CDWRITER-Device.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/CDWRITER-Device.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/CDWRITER-Device.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/CDWRITER-Device.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -89,7 +89,7 @@ Name[tg]=Баровардан Name[th]=เอาแผ่นสื่อออก Name[tr]=Çıkart -Name[ug]=قاڭقىت +Name[ug]=چىقار Name[uk]=Виштовхнути Name[uz]=Chiqarish Name[uz@cyrillic]=Чиқариш diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/Directory.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/Directory.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/Directory.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/Directory.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -24,7 +24,7 @@ Name[es]=Carpeta... Name[et]=Kataloog... Name[eu]=Karpeta... -Name[fi]=Kansio... +Name[fi]=Kansio… Name[fr]=Dossier... Name[fy]=Map... Name[ga]=Fillteán... diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/DVDROM-Device.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/DVDROM-Device.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/DVDROM-Device.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/DVDROM-Device.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -89,7 +89,7 @@ Name[tg]=Баровардан Name[th]=เอาแผ่นสื่อออก Name[tr]=Çıkart -Name[ug]=قاڭقىت +Name[ug]=چىقار Name[uk]=Виштовхнути Name[uz]=Chiqarish Name[uz@cyrillic]=Чиқариш diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/HTMLFile.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/HTMLFile.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/HTMLFile.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/HTMLFile.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -24,7 +24,7 @@ Name[es]=Archivo HTML... Name[et]=HTML-fail... Name[eu]=HTML fitxategia... -Name[fi]=HTML-tiedosto... +Name[fi]=HTML-tiedosto… Name[fr]=Fichier HTML... Name[fy]=HTML-triem....... Name[ga]=Comhad HTML... diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkCAMERA.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkCAMERA.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkCAMERA.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkCAMERA.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -24,7 +24,7 @@ Name[es]=Cámara... Name[et]=Kaameraseade Name[eu]=Kamera... -Name[fi]=Kamera... +Name[fi]=Kamera… Name[fr]=Appareil photo... Name[fy]=Kamera... Name[ga]=Gléas Ceamara... diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkCDROM.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkCDROM.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkCDROM.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkCDROM.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -24,7 +24,7 @@ Name[es]=CD-ROM... Name[et]=CD-ROM seade... Name[eu]=CD-ROM gailua... -Name[fi]=CD-ROM-laite... +Name[fi]=CD-ROM-laite… Name[fr]=Lecteur de CD-ROM... Name[fy]=kompaktskiifstasjon ... Name[ga]=Gléas CD-ROM... diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkCDWRITER.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkCDWRITER.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkCDWRITER.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkCDWRITER.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -24,7 +24,7 @@ Name[es]=Grabador de CD... Name[et]=CD-kirjutaja... Name[eu]=CDWRITER gailua... -Name[fi]=CDWRITER-laite... +Name[fi]=CDWRITER-laite… Name[fr]=Graveur de CD... Name[fy]=kompaktskiifstasjon... Name[ga]=Gléas CDWRITER... diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkFloppy.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkFloppy.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkFloppy.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkFloppy.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -24,7 +24,7 @@ Name[es]=Disquetera... Name[et]=Flopiseade... Name[eu]=Diskete gailua... -Name[fi]=Levykeasema... +Name[fi]=Levykeasema… Name[fr]=Lecteur de disquettes... Name[fy]=Slappe skiifstasjon... Name[ga]=Gléas Diosca Flapach... diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkHD.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkHD.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkHD.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkHD.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -24,7 +24,7 @@ Name[es]=Disco duro... Name[et]=Kõvaketas... Name[eu]=Disko gogorra... -Name[fi]=Kiintolevy... +Name[fi]=Kiintolevy… Name[fr]=Disque dur... Name[fy]=Fêste skiif... Name[ga]=Gléas Diosca Crua... diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkMO.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkMO.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkMO.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkMO.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -24,7 +24,7 @@ Name[es]=Dispositivo MO... Name[et]=MO seade... Name[eu]=MO gailua... -Name[fi]=MO-laite... +Name[fi]=MO-laite… Name[fr]=Périphérique MO... Name[fy]=Magnetyske skiif stasjon... Name[ga]=Gléas MO... diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkNFS.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkNFS.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkNFS.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkNFS.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -24,7 +24,7 @@ Name[es]=NFS... Name[et]=NFS... Name[eu]=NFS... -Name[fi]=NFS... +Name[fi]=NFS… Name[fr]=NFS... Name[fy]=NFS... Name[ga]=NFS... diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkPath.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkPath.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkPath.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkPath.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -16,7 +16,7 @@ Name[es]=Enlace básico a archivo o carpeta... Name[et]=Lihtlink failile või kataloogile... Name[eu]=Oinarrizko esteka fitxategi edo karpetara... -Name[fi]=Peruslinkki tiedostoon tai kansioon... +Name[fi]=Peruslinkki tiedostoon tai kansioon… Name[fr]=Lien standard vers un fichier ou un dossier... Name[fy]=Basis keppeling nei triem of triemtafel Name[ga]=Nasc bunúsach le comhad nó comhadlann... diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkProgram.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkProgram.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkProgram.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkProgram.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -22,7 +22,7 @@ Name[es]=Enlace a aplicación... Name[et]=Viit rakendusele... Name[eu]=Estekatu aplikazioa... -Name[fi]=Linkki sovellukseen... +Name[fi]=Linkki sovellukseen… Name[fr]=Lien vers une application... Name[fy]=Keppeling nei applikaasje... Name[ga]=Nasc le Feidhmchlár... diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkURL.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkURL.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkURL.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkURL.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -24,7 +24,7 @@ Name[es]=Enlace a ubicación (URL)... Name[et]=Viit asukohale (URL)... Name[eu]=Estekatu kokapena (URLa)... -Name[fi]=Linkki sijaintiin (URL)... +Name[fi]=Linkki sijaintiin (URL)… Name[fr]=Lien vers un emplacement (URL)... Name[fy]=Keppeling nei lokaasje (URL-adres)... Name[ga]=Nasc le Suíomh (URL)... @@ -63,7 +63,7 @@ Name[pl]=Skrót do adresu (URL)... Name[pt]=Atalho para Localização (URL)... Name[pt_BR]=Link para localização (URL)... -Name[ro]=Legătură către locație (URL)... +Name[ro]=Legătură către adresă (URL)... Name[ru]=Адрес в Интернете... Name[se]=Liŋka báikái (URL) … Name[si]=ස්ථානයට සබැඳිය (URL)... @@ -152,7 +152,7 @@ Comment[pl]=Nowy skrót do adresu internetowego (URL): Comment[pt]=Indique o atalho para a localização (URL): Comment[pt_BR]=Indique o link para a localização (URL): -Comment[ro]=Introduceți legătura către locație (URL): +Comment[ro]=Introduceți legătura către adresă (URL): Comment[ru]=Адрес в Интернете: Comment[se]=Čális liŋkka báikái (URL): Comment[si]=ස්ථානයට සබැඳිය ඇතුළු කරන්න(URL): diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkZIP.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkZIP.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/linkZIP.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/linkZIP.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -24,7 +24,7 @@ Name[es]=Unidad ZIP... Name[et]=ZIP seade... Name[eu]=ZIP gailua... -Name[fi]=ZIP-laite... +Name[fi]=ZIP-laite… Name[fr]=Lecteur ZIP... Name[fy]=ZIP-apparaat... Name[ga]=Gléas ZIP... @@ -79,7 +79,7 @@ Name[tg]=Дастгоҳи ZIP... Name[th]=อุปกรณ์ดิสก์ ZIP... Name[tr]=ZIP Aygıtı... -Name[ug]=ZIP ئۈسكۈنەسى… +Name[ug]=ZIP ئۈسكۈنىسى… Name[uk]=Пристрій ZIP... Name[uz]=ZIP uskunasi... Name[uz@cyrillic]=ZIP ускунаси... diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/TextFile.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/TextFile.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/TextFile.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/TextFile.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -24,7 +24,7 @@ Name[es]=Archivo de texto... Name[et]=Tekstifail... Name[eu]=Testu fitxategia... -Name[fi]=Tekstitiedosto... +Name[fi]=Tekstitiedosto… Name[fr]=Fichier texte... Name[fy]=Teksttriem...... Name[ga]=Téacschomhad... diff -Nru netrunner-desktop-containment-4.11.1/lib/konq/Templates/ZIP-Device.desktop netrunner-desktop-containment-4.13.0/lib/konq/Templates/ZIP-Device.desktop --- netrunner-desktop-containment-4.11.1/lib/konq/Templates/ZIP-Device.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/lib/konq/Templates/ZIP-Device.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -89,7 +89,7 @@ Name[tg]=Баровардан Name[th]=เอาแผ่นสื่อออก Name[tr]=Çıkart -Name[ug]=قاڭقىت +Name[ug]=چىقار Name[uk]=Виштовхнути Name[uz]=Chiqarish Name[uz@cyrillic]=Чиқариш diff -Nru netrunner-desktop-containment-4.11.1/nsplugins/khtml_plugins.desktop netrunner-desktop-containment-4.13.0/nsplugins/khtml_plugins.desktop --- netrunner-desktop-containment-4.11.1/nsplugins/khtml_plugins.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/nsplugins/khtml_plugins.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -197,9 +197,11 @@ Comment[zh_CN]=配置浏览器插件 Comment[zh_TW]=設定瀏覽器外掛程式 X-KDE-Keywords=konqueror,kfm,browser,html,web,www,fonts,plugins +X-KDE-Keywords[bg]=браузър,уеб,шрифт,приставка,konqueror,kfm,browser,html,web,www,fonts,plugins X-KDE-Keywords[bs]=konqueror,kfm,browser,html,web,www,fonts,plugins X-KDE-Keywords[ca]=konqueror,kfm,navegador,html,web,www,tipus de lletres,connectors X-KDE-Keywords[ca@valencia]=konqueror,kfm,navegador,html,web,www,tipus de lletres,connectors +X-KDE-Keywords[cs]=konqueror,kfm,prohlížeč,html,web,www,písma,moduly X-KDE-Keywords[da]=konqueror,kfm,browser,html,web,www,fonts,plugins,skrifttyper X-KDE-Keywords[de]=Konqueror,kfm,Browser,HTML,Web,WWW,Schriften,Plugins X-KDE-Keywords[el]=konqueror,kfm,περιηγητής,html,ιστός,www,γραμματοσειρές,πρόσθετα @@ -223,6 +225,7 @@ X-KDE-Keywords[pl]=konqueror,kfm,przeglądarka,html,sieć,www,czcionki,wtyczki X-KDE-Keywords[pt]=konqueror,kfm,navegador,HTML,Web,WWW,tipos de letra,plugins X-KDE-Keywords[pt_BR]=konqueror,kfm,navegador,html,web,www,fontes,plugins +X-KDE-Keywords[ro]=konqueror,kfm,navigator,html,web,www,fonturi,module,extensii X-KDE-Keywords[ru]=konqueror,kfm,browser,html,web,www,fonts,plugins,браузер,веб,шрифты,расширения X-KDE-Keywords[sk]=konqueror,kfm,prehliadač,html,web,www,písma,pluginy X-KDE-Keywords[sl]=konqueror,kfm,brskalnik,html,splet,www,pisave,vstavki diff -Nru netrunner-desktop-containment-4.11.1/.pc/applied-patches netrunner-desktop-containment-4.13.0/.pc/applied-patches --- netrunner-desktop-containment-4.11.1/.pc/applied-patches 2014-01-02 18:48:32.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/.pc/applied-patches 2014-05-26 15:31:27.000000000 +0000 @@ -2,6 +2,5 @@ kubuntu_folderview_livecd_directory.diff kubuntu_folderwidget_drawing.diff kubuntu_install_flash.diff -kubuntu_konq_scans_nsplugins_at_startup.diff enable_dlrestrictions.diff netrunner_disable_libkonq.diff diff -Nru netrunner-desktop-containment-4.11.1/.pc/enable_debianabimanager.diff/CMakeLists.txt netrunner-desktop-containment-4.13.0/.pc/enable_debianabimanager.diff/CMakeLists.txt --- netrunner-desktop-containment-4.11.1/.pc/enable_debianabimanager.diff/CMakeLists.txt 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/.pc/enable_debianabimanager.diff/CMakeLists.txt 2014-05-26 15:31:22.000000000 +0000 @@ -12,12 +12,6 @@ find_package(KDE4 4.10.60 REQUIRED) include (KDE4Defaults) -find_package(Strigi) -set_package_properties(Strigi PROPERTIES DESCRIPTION "Desktop indexing and search support" - URL "http://strigi.sourceforge.net" - TYPE REQUIRED - ) - find_package(ZLIB) set_package_properties(ZLIB PROPERTIES DESCRIPTION "Support for gzip compressed files and data streams" URL "http://www.zlib.net" diff -Nru netrunner-desktop-containment-4.11.1/.pc/enable_dlrestrictions.diff/CMakeLists.txt netrunner-desktop-containment-4.13.0/.pc/enable_dlrestrictions.diff/CMakeLists.txt --- netrunner-desktop-containment-4.11.1/.pc/enable_dlrestrictions.diff/CMakeLists.txt 2014-01-02 18:48:32.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/.pc/enable_dlrestrictions.diff/CMakeLists.txt 2014-05-26 15:31:27.000000000 +0000 @@ -12,12 +12,6 @@ find_package(KDE4 4.10.60 REQUIRED) include (KDE4Defaults) -find_package(Strigi) -set_package_properties(Strigi PROPERTIES DESCRIPTION "Desktop indexing and search support" - URL "http://strigi.sourceforge.net" - TYPE REQUIRED - ) - find_package(ZLIB) set_package_properties(ZLIB PROPERTIES DESCRIPTION "Support for gzip compressed files and data streams" URL "http://www.zlib.net" diff -Nru netrunner-desktop-containment-4.11.1/.pc/kubuntu_folderview_livecd_directory.diff/plasma/applets/folderview/folderview.cpp netrunner-desktop-containment-4.13.0/.pc/kubuntu_folderview_livecd_directory.diff/plasma/applets/folderview/folderview.cpp --- netrunner-desktop-containment-4.11.1/.pc/kubuntu_folderview_livecd_directory.diff/plasma/applets/folderview/folderview.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/.pc/kubuntu_folderview_livecd_directory.diff/plasma/applets/folderview/folderview.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -712,10 +712,6 @@ uiLocation.showDesktopFolder->setChecked(true); uiLocation.placesCombo->setEnabled(false); uiLocation.lineEdit->setEnabled(false); - } else if (m_url == KUrl("activities:/current/")) { - uiLocation.showActivity->setChecked(true); - uiLocation.placesCombo->setEnabled(false); - uiLocation.lineEdit->setEnabled(false); } else { QModelIndex index; for (int i = 0; i < placesFilter->rowCount(); i++) { @@ -871,7 +867,6 @@ connect(uiFilter.filterFilesList->model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), parent, SLOT(settingsModified())); connect(uiLocation.showDesktopFolder, SIGNAL(toggled(bool)), parent, SLOT(settingsModified())); - connect(uiLocation.showActivity, SIGNAL(toggled(bool)), parent, SLOT(settingsModified())); connect(uiLocation.showPlace, SIGNAL(toggled(bool)), parent, SLOT(settingsModified())); connect(uiLocation.titleCombo, SIGNAL(currentIndexChanged(int)), parent, SLOT(settingsModified())); connect(uiLocation.titleEdit, SIGNAL(textChanged(QString)), parent, SLOT(settingsModified())); @@ -886,8 +881,6 @@ if (uiLocation.showDesktopFolder->isChecked()) { url = KUrl("desktop:/"); - } else if (uiLocation.showActivity->isChecked()) { - url = KUrl("activities:/current/"); } else if (uiLocation.showPlace->isChecked()) { PlacesFilterModel *filter = static_cast(uiLocation.placesCombo->model()); KFilePlacesModel *model = static_cast(filter->sourceModel()); diff -Nru netrunner-desktop-containment-4.11.1/.pc/kubuntu_install_flash.diff/konqueror/src/konqmainwindow.cpp netrunner-desktop-containment-4.13.0/.pc/kubuntu_install_flash.diff/konqueror/src/konqmainwindow.cpp --- netrunner-desktop-containment-4.11.1/.pc/kubuntu_install_flash.diff/konqueror/src/konqmainwindow.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/.pc/kubuntu_install_flash.diff/konqueror/src/konqmainwindow.cpp 2014-05-26 15:31:22.000000000 +0000 @@ -5024,7 +5024,7 @@ // Create a KToggleAction for each view mode, and plug it into the menu KToggleAction* action = new KToggleAction(KIcon(serviceAction.icon()), serviceAction.text(), this); //actionCollection()->addAction(desktopEntryName /*not unique!*/, action); - action->setObjectName(desktopEntryName); + action->setObjectName(desktopEntryName + QLatin1String("-viewmode")); action->setData(QVariant(serviceAction.name())); action->setActionGroup(m_viewModesGroup); m_viewModeMenu->menu()->addAction(action); diff -Nru netrunner-desktop-containment-4.11.1/.pc/kubuntu_konq_scans_nsplugins_at_startup.diff/konqueror/src/konqmain.cpp netrunner-desktop-containment-4.13.0/.pc/kubuntu_konq_scans_nsplugins_at_startup.diff/konqueror/src/konqmain.cpp --- netrunner-desktop-containment-4.11.1/.pc/kubuntu_konq_scans_nsplugins_at_startup.diff/konqueror/src/konqmain.cpp 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/.pc/kubuntu_konq_scans_nsplugins_at_startup.diff/konqueror/src/konqmain.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,243 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 1998, 1999 Simon Hausmann - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This program 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 - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "konqapplication.h" -#include "konqmisc.h" -#include "konqfactory.h" -#include "konqmainwindow.h" -#include "konqsessionmanager.h" -#include "konqview.h" -#include "konqsettingsxt.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef Q_WS_X11 -#include -#endif - -#include -#include - -static void listProfiles() -{ - QStringList profiles = KGlobal::dirs()->findAllResources("data", "konqueror/profiles/*", KStandardDirs::NoDuplicates); - profiles.sort(); - Q_FOREACH(const QString& _file, profiles) - { - const QString file = _file.mid(_file.lastIndexOf('/')+1); - printf("%s\n", QFile::encodeName(file).constData()); - } -} - -static void listSessions() -{ - const QString dir = KStandardDirs::locateLocal("appdata", "sessions/"); - QDirIterator it(dir, QDir::Readable|QDir::NoDotAndDotDot|QDir::Dirs); - while (it.hasNext()) - { - QFileInfo fileInfo(it.next()); - printf("%s\n", QFile::encodeName(fileInfo.baseName()).constData()); - } -} - -static bool tryPreload() -{ -#ifdef Q_WS_X11 - if(KonqSettings::maxPreloadCount() > 0) { - QDBusInterface ref("org.kde.kded", "/modules/konqy_preloader", "org.kde.konqueror.Preloader", QDBusConnection::sessionBus()); - QX11Info info; - QDBusReply retVal = ref.call(QDBus::Block, "registerPreloadedKonqy", QDBusConnection::sessionBus().baseService(), info.screen()); - if(!retVal) - return false; // too many preloaded or failed - KonqMainWindow* win = new KonqMainWindow; // prepare an empty window too - // KonqMainWindow ctor sets always the preloaded flag to false, so create the window before this - KonqMainWindow::setPreloadedFlag(true); - KonqMainWindow::setPreloadedWindow(win); - kDebug() << "Konqy preloaded :" << QDBusConnection::sessionBus().baseService(); - return true; - } else { - return false; // no preloading - } -#else - return false; // no preloading -#endif -} - -extern "C" KDE_EXPORT int kdemain(int argc, char **argv) -{ - KCmdLineArgs::init(argc, argv, KonqFactory::aboutData()); - - - KCmdLineOptions options; - - options.add("silent", ki18n("Start without a default window, when called without URLs")); - - options.add("preload", ki18n("Preload for later use. This mode does not support URLs on the command line")); - - options.add("profile ", ki18n("Profile to open")); - - options.add("profiles", ki18n("List available profiles")); - - options.add("sessions", ki18n("List available sessions")); - - options.add("open-session ", ki18n("Session to open")); - - options.add("mimetype ", ki18n("Mimetype to use for this URL (e.g. text/html or inode/directory)")); - options.add("part ", ki18n("Part to use (e.g. khtml or kwebkitpart)")); - - options.add("select", ki18n("For URLs that point to files, opens the directory and selects the file, instead of opening the actual file")); - - options.add("+[URL]", ki18n("Location to open")); - - KCmdLineArgs::addCmdLineOptions(options); // Add our own options. - KCmdLineArgs::addTempFileOption(); - - KonquerorApplication app; - app.setQuitOnLastWindowClosed(false); - - KGlobal::locale()->insertCatalog("libkonq"); // needed for apps using libkonq - - KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - - if (app.isSessionRestored()) { - KonqSessionManager::self()->askUserToRestoreAutosavedAbandonedSessions(); - - int n = 1; - while (KonqMainWindow::canBeRestored(n)) - { - const QString className = KXmlGuiWindow::classNameOfToplevel(n); - if (className == QLatin1String("KonqMainWindow")) - (new KonqMainWindow())->restore(n); - else - kWarning() << "Unknown class" << className << "in session saved data!" ; - ++n; - } - } else { - // First the invocations that do not take urls. - if (args->isSet("preload")) { - if (!tryPreload()) - return 0; // no preloading - } else if (args->isSet("profiles")) { - listProfiles(); - return 0; - } else if (args->isSet("sessions")) { - listSessions(); - return 0; - } else if (args->isSet("open-session")) { - const QString session = args->getOption("open-session"); - QString sessionPath = session; - if (!session.startsWith('/')) { - sessionPath = KStandardDirs::locateLocal("appdata", "sessions/" + session); - } - - QDirIterator it(sessionPath, QDir::Readable|QDir::Files); - if (!it.hasNext()) { - kError() << "session" << session << "not found or empty"; - return -1; - } - - KonqSessionManager::self()->restoreSessions(sessionPath); - } else if (args->count() == 0) { - // No args. If --silent, do nothing, otherwise create a default window. - if (!args->isSet("silent")) { - const QString profile = args->getOption("profile"); - KonqMainWindow* mainWin = KonqMisc::createBrowserWindowFromProfile(QString(), profile); - mainWin->show(); - } - } else { - // Now is a good time to parse each argument as a URL. - KUrl::List urlList; - for (int i = 0; i < args->count(); i++) { - // KonqMisc::konqFilteredURL doesn't cope with local files... A bit of hackery below - const KUrl url = args->url(i); - if (url.isLocalFile() && QFile::exists(url.toLocalFile())) // "konqueror index.html" - urlList += url; - else - urlList += KUrl(KonqMisc::konqFilteredURL(0L, args->arg(i))); // "konqueror slashdot.org" - } - - QStringList filesToSelect; - - if (args->isSet("select")) { - // Get all distinct directories from 'files' and open a tab - // for each directory. - QList dirs; - Q_FOREACH(const KUrl& url, urlList) { - const KUrl dir(url.directory()); - if (!dirs.contains(dir)) { - dirs.append(dir); - } - } - filesToSelect = urlList.toStringList(); - urlList = dirs; - } - - KUrl firstUrl = urlList.takeFirst(); - - KParts::OpenUrlArguments urlargs; - if (args->isSet("mimetype")) - urlargs.setMimeType(args->getOption("mimetype")); - - KonqOpenURLRequest req; - req.args = urlargs; - req.filesToSelect = filesToSelect; - req.tempFile = KCmdLineArgs::isTempFileSet(); - req.serviceName = args->getOption("part"); - - KonqMainWindow * mainwin = 0; - if (args->isSet("profile")) { - const QString profile = args->getOption("profile"); - //kDebug() << "main() -> createBrowserWindowFromProfile mimeType=" << urlargs.mimeType(); - mainwin = KonqMisc::createBrowserWindowFromProfile(QString(), profile, firstUrl, req); - } else { - mainwin = KonqMisc::createNewWindow(firstUrl, req); - } - mainwin->show(); - if (!urlList.isEmpty()) { - // Open the other urls as tabs in that window - mainwin->openMultiURL(urlList); - } - } - } - args->clear(); - - app.exec(); - - // Delete all KonqMainWindows, so that we don't have - // any parts loaded when KLibLoader::cleanUp is called. - // Their deletion was postponed in their event() - // (and Qt doesn't delete WDestructiveClose widgets on exit anyway :() - while(KonqMainWindow::mainWindowList() != NULL) - { // the list will be deleted by last KonqMainWindow - delete KonqMainWindow::mainWindowList()->first(); - } - - // Notify the session manager that the instance was closed without errors, and normally. - KonqSessionManager::self()->disableAutosave(); - KonqSessionManager::self()->deleteOwnedSessions(); - - return 0; -} diff -Nru netrunner-desktop-containment-4.11.1/.pc/netrunner_disable_libkonq.diff/CMakeLists.txt netrunner-desktop-containment-4.13.0/.pc/netrunner_disable_libkonq.diff/CMakeLists.txt --- netrunner-desktop-containment-4.11.1/.pc/netrunner_disable_libkonq.diff/CMakeLists.txt 2014-01-02 18:48:32.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/.pc/netrunner_disable_libkonq.diff/CMakeLists.txt 2014-05-26 15:31:27.000000000 +0000 @@ -12,12 +12,6 @@ find_package(KDE4 4.10.60 REQUIRED) include (KDE4Defaults) -find_package(Strigi) -set_package_properties(Strigi PROPERTIES DESCRIPTION "Desktop indexing and search support" - URL "http://strigi.sourceforge.net" - TYPE REQUIRED - ) - find_package(ZLIB) set_package_properties(ZLIB PROPERTIES DESCRIPTION "Support for gzip compressed files and data streams" URL "http://www.zlib.net" diff -Nru netrunner-desktop-containment-4.11.1/plasma/applets/folderview/folderview.cpp netrunner-desktop-containment-4.13.0/plasma/applets/folderview/folderview.cpp --- netrunner-desktop-containment-4.11.1/plasma/applets/folderview/folderview.cpp 2014-01-02 18:48:32.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/plasma/applets/folderview/folderview.cpp 2014-05-26 15:31:27.000000000 +0000 @@ -717,10 +717,6 @@ uiLocation.showDesktopFolder->setChecked(true); uiLocation.placesCombo->setEnabled(false); uiLocation.lineEdit->setEnabled(false); - } else if (m_url == KUrl("activities:/current/")) { - uiLocation.showActivity->setChecked(true); - uiLocation.placesCombo->setEnabled(false); - uiLocation.lineEdit->setEnabled(false); } else { QModelIndex index; for (int i = 0; i < placesFilter->rowCount(); i++) { @@ -876,7 +872,6 @@ connect(uiFilter.filterFilesList->model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), parent, SLOT(settingsModified())); connect(uiLocation.showDesktopFolder, SIGNAL(toggled(bool)), parent, SLOT(settingsModified())); - connect(uiLocation.showActivity, SIGNAL(toggled(bool)), parent, SLOT(settingsModified())); connect(uiLocation.showPlace, SIGNAL(toggled(bool)), parent, SLOT(settingsModified())); connect(uiLocation.titleCombo, SIGNAL(currentIndexChanged(int)), parent, SLOT(settingsModified())); connect(uiLocation.titleEdit, SIGNAL(textChanged(QString)), parent, SLOT(settingsModified())); @@ -891,8 +886,6 @@ if (uiLocation.showDesktopFolder->isChecked()) { url = KUrl("desktop:/"); - } else if (uiLocation.showActivity->isChecked()) { - url = KUrl("activities:/current/"); } else if (uiLocation.showPlace->isChecked()) { PlacesFilterModel *filter = static_cast(uiLocation.placesCombo->model()); KFilePlacesModel *model = static_cast(filter->sourceModel()); diff -Nru netrunner-desktop-containment-4.11.1/plasma/applets/folderview/folderviewLocationConfig.ui netrunner-desktop-containment-4.13.0/plasma/applets/folderview/folderviewLocationConfig.ui --- netrunner-desktop-containment-4.11.1/plasma/applets/folderview/folderviewLocationConfig.ui 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/plasma/applets/folderview/folderviewLocationConfig.ui 2014-05-26 15:31:22.000000000 +0000 @@ -42,16 +42,6 @@ - - - Show the files related to the current activity - - - locatgionButtonGroup - - - - Show a place: @@ -221,7 +211,6 @@ showDesktopFolder - showActivity showPlace placesCombo showCustomFolder diff -Nru netrunner-desktop-containment-4.11.1/plasma/applets/folderview/plasma-applet-netrunnerdesktop.desktop netrunner-desktop-containment-4.13.0/plasma/applets/folderview/plasma-applet-netrunnerdesktop.desktop --- netrunner-desktop-containment-4.11.1/plasma/applets/folderview/plasma-applet-netrunnerdesktop.desktop 2014-01-02 18:48:28.000000000 +0000 +++ netrunner-desktop-containment-4.13.0/plasma/applets/folderview/plasma-applet-netrunnerdesktop.desktop 2014-05-26 15:31:22.000000000 +0000 @@ -17,6 +17,7 @@ Comment[fr]=Afficher les contenus de dossiers Comment[ga]=Taispeáin inneachar d'fhillteáin Comment[gl]=Mostra o contido dos cartafoles +Comment[he]=הצגת התוכן של תיקייה Comment[hu]=Megjeleníti a mappák tartalmát Comment[ia]=Monstra le contentos de dossieres Comment[is]=Sýna innihald mappa