Commit Graph

80 Commits

Author SHA1 Message Date
Aaron J. Seigo
2954087e8d * eliminate the three search lists and have just one
* remove add*Match since they broke the pattern of usage (who owns the match? do you have to add it again? etc..)
* add addMatch to compliment addMatches for those runners that just ever have one match
* make the default SearchMatch type Possible rather than Exact (making Exact and Informational the exceptions, which matches usage patterns)
* const'ify the API a bit better

generally more performant, lower memory usage and clearer API having seen what is beign done in the runners. also makes it a bit easier to turn the Matches into a qt model

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=776931
2008-02-19 03:59:21 +00:00
Aaron J. Seigo
123623d675 We make a thread-local copy of the SearchContext for each Runner. As such, there is no need to do locking on the thread-local copy. This patch also adds assertions on the non-thread safe methods (e.g. addExactMatch) which are used from thread-local copies, but which should never be used in the shared version.
Also adds a addMatchesTo(SearchContext) which encapsulates this code and makes it safe to delete matches on object deletion, preventing possible memory leaks on SearchContext destruction.

Finally, don't copy all the SearchMatches already registered for each thread-local copy as that's just unused and unecessary overhead.

BIC, though SC.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=773473
2008-02-11 06:04:20 +00:00
Aaron J. Seigo
4ebb5fcaeb automatic rate limiting of runners: mark ill performing runners as slow, but let speed runners marked as slow back into the main thread pool.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=772741
2008-02-09 14:59:43 +00:00
Aaron J. Seigo
5f0afdd61c * prevent potential crash introduced with scripting support (non-init'd AbstractRunner*)
* get the args right

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=772449
2008-02-08 19:21:25 +00:00
Aaron J. Seigo
9244e126f2 seems that priority has taken over what tier was intended for; easy to add back if necessary / desired, but i think that the idea of chaining really needs more expresivity than that
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=771458
2008-02-06 02:51:21 +00:00
Aaron J. Seigo
e3c3b847f6 provide a bigLock() for runners to use whenever accessing common but non-reentrant api (e.g. most everything in kdelibs ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=770952
2008-02-04 20:28:09 +00:00
Petri Damstén
8a15088888 Scripting update.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=770587
2008-02-04 04:41:40 +00:00
Aaron J. Seigo
55eb91140b some improvements as suggested by mattr via review-board. boy, what a neat tool
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=768467
2008-01-30 06:17:13 +00:00
Aaron J. Seigo
099785fbdc let's see if serializing (via a mutex) access to kservicetypetrader helps with those kservicetypetrader related crashes i'm seeing constantly go away
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=768454
2008-01-30 03:41:36 +00:00
Aaron J. Seigo
ee32d3c996 remove the use of 1209 explicitly now that i have Winter's Magic Formula for default debug space. makes backporting way easier; sorry for the noise of the earlier commit. suppose i should read planetkde.org more closely ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758498
2008-01-08 01:25:09 +00:00
Ryan P. Bitanga
3328d293ae Give runners priority levels
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758482
2008-01-08 00:21:10 +00:00
Aaron J. Seigo
12ef6308cb use the plasma debug area (1209); i considered wrapping this in Plasma::debug() but that seems overkill ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758415
2008-01-07 20:50:31 +00:00
Aaron J. Seigo
5a44fae20f hush the compiler
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=747406
2007-12-11 22:30:05 +00:00
Aaron J. Seigo
5fc323b7db provide a place for runners to put their config. no, not overly performant but this really shouldn't need to be
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=747296
2007-12-11 16:53:40 +00:00
Ryan P. Bitanga
f1df93c794 Add runner speed functions to abstractrunner
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=746915
2007-12-10 16:20:46 +00:00
Aaron J. Seigo
cfd3bfac48 * SearchAction becomes SearchMatch; fall out of the refactoring
* add camel case headers for those classes now that they've settled in

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=744452
2007-12-03 17:18:28 +00:00
Ryan P. Bitanga
eff8326f80 Say hello to multithreaded krunner ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=743865
2007-12-02 07:11:50 +00:00
Ryan P. Bitanga
72a3b2b68b Add a whitelist to loadRunners, change canBeConfigured to isConfigurable
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=739989
2007-11-22 09:08:58 +00:00
Aaron J. Seigo
0a6f2af7f3 * move SearchAction and SearchContext to their own files
* term -> searchTerm
* add a completion object to SearchContext

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=731848
2007-11-02 02:34:46 +00:00
Aaron J. Seigo
82302e817b actually allow runns to provide their config ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=731262
2007-10-31 05:25:07 +00:00
Aaron J. Seigo
e099821b71 massive change to AbstractRunner API, but now at least it is hopefully future proof and we won't have to change it in BIC ways after 4.0
introduces two new classes: Plasma::SearchContext and Plasma::SearchAction

benefits include:
 - well, future proofing =)
 - the ability to eventually allow runners that mutate the search
 - multiple exact matches per runner
 - 'executing' of informational runners (useful for, e.g., the calculator)
 - being able to centralize expensive operations such a KUriFilter actions
 - simplifies writing runners *dramatically*

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=731253
2007-10-31 04:44:09 +00:00
Aaron J. Seigo
ff935b47f5 * KRunner/Runner -> Plasma/Runner as it is actually hosted by libplasma
* move the service description .desktop file into libs/plasma/servicetypes with the rest of them
* add a X-Plasma-RunnerPhase property so we can try and order these puppies

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=723217
2007-10-09 03:20:02 +00:00
Andreas Pakulat
70f0a9f9be Merge the KConfig branch. This are the 3 main modules (+kdeadmin), which are
needed now because friday is the last BC day. The rest of the modules will
follow as fast as my laptop allows.

svn path=/trunk/KDE/kdelibs/; revision=721704
2007-10-05 22:21:25 +00:00
Aaron J. Seigo
06465f6cb1 more deprecated api removal; kservice seems almost OO now ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=717491
2007-09-26 23:06:17 +00:00
Aaron J. Seigo
bf30d19c41 improve error reporting when a plugin fails to load
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=705985
2007-08-29 03:06:48 +00:00
Aaron J. Seigo
db4a7ebe61 copyright cleanups:
* Copyright (C) -> Copyright
* add "or later" clause to files that i have the sole copyright on
* add current year (2007) to my copyrights where it was missing

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696946
2007-08-06 11:20:02 +00:00
Aaron J. Seigo
ac918ad4bf kdebug fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=695587
2007-08-02 13:12:59 +00:00
Aaron J. Seigo
abd156ece2 * clarify several points in the api documentation. time to do a techbase tutorial!
* pass the exact match action into exec(). this allows runners the opportunity to store otherwise expensive information in the action and get it back easily

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=689642
2007-07-18 19:09:41 +00:00
Matt Williams
dfb58b44c1 EBN Fixes
* Include own header file first
* Make d-pointer const
* Use references-to-const

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=667001
2007-05-21 14:28:03 +00:00
Aaron J. Seigo
27f5c75d76 * Runner -> AbstractRunner, to denote that it is an ABC
* fancy includes so third party stuff can do #include <Plasma/Svg> instead of #include "plasma/svg.h", etc

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=644677
2007-03-20 17:37:44 +00:00