[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Review Request: Add support for single Runner queries to krunner
From:       "Aaron Seigo" <aseigo () kde ! org>
Date:       2009-11-17 0:05:45
Message-ID: 20091117000545.4377.95458 () localhost
[Download RAW message or body]



> On 2009-11-12 20:39:42, Aaron Seigo wrote:
> > trunk/KDE/kdelibs/plasma/runnermanager.h, line 149
> > <http://reviewboard.kde.org/r/2090/diff/1/?file=13853#file13853line149>
> > 
> > const bool isn't necessary; in fact, i think this whole method shouldn't be \
> > necessary at all. if RunnerContext::singleRunnerMode() then replaceEmptyQuery \
> > should be implied?
> 
> Jacopo De Simoi wrote:
> In fact it should. I was worried of changing the default behaviour of this method. \
> I was not sure to be able to check that this wouldn't affect any other app using \
> runnermanager (kickoff?) 
> Aaron Seigo wrote:
> i don't see how it could affect any other users; if they don't call \
> setSingleRunnerMode(true) it behaves exactly as it did before. so it would require \
> purposefully changing the code in the other places it is used to cause problems :) 
> Jacopo De Simoi wrote:
> aw, I should really read the whole comment before replying. In fact your comment \
> makes perfect sense 
> Jacopo De Simoi wrote:
> I am trying to fix this and now I remember what didn't work without that bool.
> The point is that launchQuery resets() the context, hence it is launchQuery itself \
> that sets the single runner query mode; thus it makes little sense to check \
> RunnerContext::singleRunnerMode(); and I am not sure if assuming that the empty \
> query should always be substituted if a runner is specified would break other apps. \
> What should I do then? keep the bool? any alternative solutions? 

if the runner has set a default syntax, then it should be substituted. if there is no \
default syntax, it doesn't get substituted. in this case, i think it's really less a \
question of what the application using RunnerManager expects and more what the \
AbstractRunner plugin would expect. so yes, i think we can still just get rid of that \
method with the extra bool :)


- Aaron


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2090/#review3063
-----------------------------------------------------------


On 2009-11-07 20:16:02, Jacopo De Simoi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/2090/
> -----------------------------------------------------------
> 
> (Updated 2009-11-07 20:16:02)
> 
> 
> Review request for Plasma, Aaron Seigo and Ryan Bitanga.
> 
> 
> Summary
> -------
> 
> This is the API needed by the new single Runner mode for krunner (more on usecases \
> in part II:krunner) for kdelibs; 
> A runner can now optionally define a Default syntax; if this is the case, the \
> runner will be exposed as single-runner-mode capable.  On request, the default \
> syntax will be replaced to the empty query in RunnerManager::launchQuery. 
> The context is aware of the fact that we are in single runner query mode in case \
> the runners need to change their behaviour accordingly (e.g. to _not_ discard \
> queries with less than 3 chars) 
> 
> Diffs
> -----
> 
> trunk/KDE/kdelibs/plasma/abstractrunner.h 1045930 
> trunk/KDE/kdelibs/plasma/abstractrunner.cpp 1045930 
> trunk/KDE/kdelibs/plasma/runnercontext.h 1045930 
> trunk/KDE/kdelibs/plasma/runnercontext.cpp 1045930 
> trunk/KDE/kdelibs/plasma/runnermanager.h 1045930 
> trunk/KDE/kdelibs/plasma/runnermanager.cpp 1045930 
> 
> Diff: http://reviewboard.kde.org/r/2090/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jacopo
> 
> 

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic