From kde-panel-devel Thu Oct 29 00:17:59 2009 From: Sebastian =?iso-8859-15?q?K=FCgler?= Date: Thu, 29 Oct 2009 00:17:59 +0000 To: kde-panel-devel Subject: Re: dropped URL handling in containment, Message-Id: <200910290118.04871.sebas () kde ! org> X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=125677560024057 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1984478589==" --===============1984478589== Content-Type: multipart/signed; boundary="nextPart1527838.aWgvgCPOVC"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1527838.aWgvgCPOVC Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable On Wednesday 28 October 2009 19:47:13 Aaron J. Seigo wrote: > On October 28, 2009, Sebastian K=FCgler wrote: > > On Wednesday 28 October 2009 16:39:41 Aaron J. Seigo wrote: > > > On October 27, 2009, Sebastian K=FCgler wrote: > > > > On Tuesday 27 October 2009 17:19:24 Aaron J. Seigo wrote: > > > > > On October 27, 2009, Sebastian K=FCgler wrote: > > > > > > Is this something I should pursue? It sounds simple enough ... > > > > > > > > > > sure; i don't see any downside to it and the results could be > > > > > interesting; worst case is we'd have a failed experimnt on our > > > > > hands and one more way not to do it (in the words of Edison ;) b= ut > > > > > i think this could work out very well.. > > > > > > > > The attached patch seems to work. I've not really tested it, just > > > > confirmed that it works at least in one case (emailmessage, added > > > > X-Plasma-DropUrlPatterns=3Dakonadi:* to its desktop file) -- it's = late > > > > and I should sleep. If it's conceptually OK, I'll clean it up and > > > > submit it to review board. > > > > > > doing: > > > > > > KPluginInfo::List allApplets =3D KPluginInfo::fromServices(offers, "e= xist > > > [X- Plasma-DropUrlPatterns]") > > > > > > should eliminate all the entries that don't have any DropUrlPatterns > > > without having to create and then cycle through all the plasma > > > applets installed. > > > > Good, good. That part felt icky... > > > > > this shouldn't be needed: > > > > > > QHash dropPlugins; > > > > > > the URL can be retrieved in mimeTypeRetrieved with job->url() > > > > We the list of plugins (not the URL, I'm retrieving that from the job > > indeed) for the following case: > > > > - a URL is dropped > > - applets matching DropUrlPatterns are found > > - the TransferJob returns an error >=20 > the same thing could be achieved by calling the method that fetches the > matching plugins in each place that needs it (including the error path) > rather than caching those values. that would mean calling it twice on > success, or twice on error or three times on error-that-isn't-an-error. >=20 > it's not a hot path and finding the matching plasmoids shouldn't be very > slow at all. i'd prefer to keep the bookkeeping for drops simple as long > as it isn't a performance problem. I've removed the private member, and found that we can actually do with cal= ling=20 listAppletInfoForUrl() only once. We simply don't cop out on job->error() i= n=20 dropResult() and call the slot anyway, the counting and stuff now happens o= nly there,=20 looks a bit cleaner as well. :) I've also changed the other bits, cleaned up a bit and sent it to reviewboa= rd. Thanks for the feedback! =2D-=20 sebas http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9=20 --nextPart1527838.aWgvgCPOVC Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQEcBAABAgAGBQJK6N83AAoJEGdNh9WRGQ754cEH/35wrGy4+Wy6oFnwfwSfXD0x il96LW5DvoHzykGsbKi7MFI2tDIItXi2adxdVAkCrJ/M0++CLHCNkF6SCa841xpd M3CRkNgmfdrrmjT8f2zx0juTKaKY4MJtmTgFEBn2XB+Anq0Qu26AWOm7IhzLeRYF Vq6O7wI6NyksbvIF3hg8Gz+XhfiAzOWK/FDlBszKlVUf3fQdZOVpTtNFnBqT52uP Ag1+XBGwsMMvNpj2gdH1xiavrz76BnkTUgBL//eq+iu8EF5Dnu4LmnxaLou+XL+k o8PtcWzrPMpeW1fMCCTh61TivnO6SsyzkBtKyvsYvTxTgEorscaBzX64xQgLOBs= =87uo -----END PGP SIGNATURE----- --nextPart1527838.aWgvgCPOVC-- --===============1984478589== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel --===============1984478589==--