Commit Graph

6884 Commits

Author SHA1 Message Date
Aaron Seigo
82eee5c3b7 avoid compiling in debug strings when compiled without debug 2011-07-29 15:46:52 +02:00
Aaron Seigo
763fb8927c discard discoveries only when the svg elements also go away; we don't care about colors 2011-07-22 17:55:57 +02:00
Aaron Seigo
69a6558a00 put a found-paths cache in Theme 2011-07-22 17:34:46 +02:00
Aaron Seigo
fbde93c64f give package a cache for found items; make the dptr implicitly shared
this drops a 100k loop of copies from ~2700ms to ~37ms and a 100k loop
of copy-n-find from ~3900ms to ~40ms.

the cache addition is predicated on the idea that lookups of the same files will be frequent enough to warrant the small amount of extra memory usage for the cache. if that does not hold in practice (though it appears to) then this will not be a gain and in fact be a small net loss for memory footprint

the dptr change is predicated on the assumption that copies of Package will be frequent, and so must be low cost. this is known to be true. even if it wasn't, there is no down-side to this change. the upside are significant time and memory savings.
2011-07-22 17:24:40 +02:00
Aaron Seigo
c0a60951a5 add a test for copy-n-fetch performance; make list based checks list order independant 2011-07-22 17:24:10 +02:00
Aaron Seigo
bd10c7175e Merge remote-tracking branch 'origin/master' into libplasma2
Conflicts:
	plasma/containment.cpp
	plasma/package.cpp
	plasma/packagestructure.cpp
	plasma/private/package_p.h
	plasma/scripting/scriptengine.cpp
2011-07-21 15:31:07 +02:00
Aaron Seigo
e0d8147e54 fix up test 2011-07-21 15:18:54 +02:00
Aaron Seigo
5b4f61a10a hashing value changed on package 2011-07-21 15:18:45 +02:00
Aaron Seigo
1ca9580149 call initPackage in the ctor 2011-07-21 15:04:56 +02:00
Aaron Seigo
678d5d81ef fix assignment and copy operators 2011-07-21 14:57:43 +02:00
Aaron Seigo
9701a7a2ad build 2011-07-21 14:48:12 +02:00
Aaron Seigo
f3a66f1f79 allow stripping out the name and mimetype data from the package info; only really useful for package introspection (e.g. in plasmate and other such tools) but a waste on mobile 2011-07-21 14:41:01 +02:00
Aaron Seigo
33cdfc7c77 fix install and introduce another profile-based footprint reduction opportunity 2011-07-21 14:39:55 +02:00
Aaron Seigo
3d5fa3ca43 build, though wallpaper is still broken 2011-07-21 14:39:02 +02:00
Aaron Seigo
a4187dc0a7 add missing impl 2011-07-21 14:38:44 +02:00
Aaron Seigo
ca860417c9 PluginLoader API changes 2011-07-20 00:06:24 +02:00
Aaron Seigo
35898d57f1 get rid of all Class:load(..) methods, use PluginLoader directrly. --apiBloat; 2011-07-19 22:04:22 +02:00
Aaron Seigo
e40bb1bcdd adapt to changes in PackageStructure api 2011-07-19 21:53:03 +02:00
Aaron Seigo
240a7b1ebb and we're package to package-plasmastructure.desktop 2011-07-19 21:52:47 +02:00
Aaron Seigo
4a3ef536e6 private class changes to match the public class usage 2011-07-19 21:52:33 +02:00
Aaron Seigo
14f9471784 one thing one was using actionsFromMenu, not justifiable to put it here 2011-07-19 21:51:46 +02:00
Aaron Seigo
e80bc7d48a clean up includes 2011-07-19 21:41:33 +02:00
Aaron Seigo
d687e0d4b6 let PluginLoader do the work for us 2011-07-19 21:41:10 +02:00
Aaron Seigo
d010143b6f use PluginLoader directly for ContainmentActions 2011-07-19 21:40:57 +02:00
Marco Martin
95f09febca remove the static hash of packagestructure
unfortunately they are stateful with a state per-package, so sharing them leads to an incorrect state
2011-07-19 21:40:25 +02:00
Aaron Seigo
c03e8c6b05 get rid of static bool for default loader and make ctor and dtor protected, rename pluginLoader() to self() for consistency 2011-07-19 21:40:12 +02:00
Aaron Seigo
933e72092a add ContainmentActions to PluginLoader 2011-07-19 21:39:51 +02:00
Aaron Seigo
fb3a64ba6c make Package use PackageStructure, remove all virtuals
also kills the read/write methods as precisely zero things were using it
2011-07-19 21:37:39 +02:00
Aaron Seigo
d89eebe1be fixes for tests.. not quite 100% yet, but getting there. 2011-07-19 21:37:08 +02:00
Aaron Seigo
32f75b826c re-port back to PackageStructure 2011-07-19 21:36:57 +02:00
Aaron Seigo
8c354ba4c6 reintroducing PackageStructure as we need it for the virtuals. it is now a properly stateless clas, however, unlike in libplasma1 2011-07-19 21:36:29 +02:00
Aaron Seigo
53b5c433e5 may as well use the d ptr directly here 2011-07-19 20:00:25 +02:00
Aaron Seigo
85a33de90e call Applet::sceneEventFilter; otherwise applet handles are broken on Applets that are also Containments
BUG:277467
2011-07-19 09:39:02 +02:00
Aaron Seigo
3fc19683fa remove the event filter if we're a containment, don't return too early from the filter 2011-07-19 09:39:01 +02:00
Aaron Seigo
d65132f92f don't remove the applet itself from the scenevent filter when deregistering as a drag handle
the event filter is also used for things like the applet handle
2011-07-19 09:39:01 +02:00
Marco Martin
9ef2c42b42 correctly concatenate the path.
package is valid again (and passes plasmoidpackagetest)
2011-07-17 12:46:17 +02:00
Aaron Seigo
911dcabb5a return the hex representation, as we used to
and now, plasmoidpackagetest passes 6 out of 6 tests. huzzah!
2011-07-15 14:24:35 +02:00
Aaron Seigo
6c21a28382 5 pass, 1 fail. to celebrate, some minor cleanups ;) 2011-07-15 14:18:17 +02:00
Aaron Seigo
08c07c4a0d d->path, not path. error while merging. thank goodness for unit tests. 2011-07-15 14:17:42 +02:00
Aaron Seigo
acb2644b16 -2 failing tests 2011-07-15 14:09:19 +02:00
Aaron Seigo
c16dffd1e7 the rest of the fallout from the package changes 2011-07-15 13:35:58 +02:00
Aaron Seigo
2e51a57701 minimize the headers a bit 2011-07-15 13:35:47 +02:00
Aaron Seigo
cfa12b6c90 put package loading into PluginLoader with the rest of them 2011-07-15 13:34:10 +02:00
Aaron Seigo
94e4f35208 Package replaces PackageStructure+Package 2011-07-15 13:04:16 +02:00
Aaron Seigo
722c77e7ce move the needed datastructures into Package 2011-07-15 13:03:56 +02:00
Aaron Seigo
abf1b8510f make the PackageStructures into Package subclasses 2011-07-15 13:03:46 +02:00
Aaron Seigo
889c9e7bd3 adapt to Package merge changes 2011-07-15 13:03:22 +02:00
Aaron Seigo
89320201ec update with package merge changes 2011-07-15 13:02:29 +02:00
Aaron Seigo
1dde80056b no longer provide access to the package from the class, let Package do that; adapt to Package merge 2011-07-15 13:02:15 +02:00
Aaron Seigo
bbc569740e use the package directly in Applet::Private 2011-07-15 13:01:52 +02:00