Commit Graph

8 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
Anne-Marie Mahfouf
782bcbce51 a few typos
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=770891
2008-02-04 16:26:49 +00:00
Aaron J. Seigo
2f479c7084 * require a SearchContext in exec since the context may have shifted during matching due to multithreading
* differentiate between resetSearchTerm and just setSearchTerm (to be used with the above)
* remove the SearchContext ptr from SearchMatch's dptr as it isn't used; don't want to mislead people or waste memory
* more const correctness

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=764593
2008-01-22 04:38:03 +00:00
Dirk Mueller
bc093cdcf5 header cleanness++
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=744474
2007-12-03 19:01:01 +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
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