Review Request 126761: [OS X] handle LaunchServices requests to open files (i.e. from the Finder)

René J.V. Bertin rjvbertin at gmail.com
Tue Jan 19 10:54:24 UTC 2016



> On Jan. 18, 2016, 5:50 p.m., Kevin Funk wrote:
> > app/main.cpp, line 633
> > <https://git.reviewboard.kde.org/r/126761/diff/2/?file=434222#file434222line633>
> >
> >     Pass the PID here? Then you don't need all the changes around `session`?
> 
> René J.V. Bertin wrote:
>     I can have another look, but I think there are at least 1 or 2 locations where I do need the name of the session the user picked

So, it seems that there is indeed only 1 location where I *probably* need to know the name of the session the user may have picked if/when presented with a session picker after provoking one or more FileOpen events:
`Core::initialize(splash, Core::Default, app.session);`

`KDevelopApplication` strikes me as a rather logical place to store something like the session name but there are of course other ways to achieve that than my current solution.
I don't see a (straightforward) way to obtain the session name from the pid that doesn't involve repeating a lot of stuff already being done in `getRunningSessionPid` - is there?
Given that most uses of `app.session` precede the call to `startHandlingFileOpenEvents` I could return to using a local `QString session` variable, and do `startHandlingFileOpenEvents(&session)` or `session = app.startHandlingFileOpenEvents()`. Whichever is preferable, and regardless of how that (new) value is determined.


- René J.V.


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126761/#review91272
-----------------------------------------------------------


On Jan. 18, 2016, 4:46 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126761/
> -----------------------------------------------------------
> 
> (Updated Jan. 18, 2016, 4:46 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdevelop
> 
> 
> Description
> -------
> 
> This patch introduces support for file open requests from for instance the Finder, on OS X. It also makes it possible to launch KDevelop from the Finder (or the Dock) with the Command key held, in which case the session picker dialog will be presented if multiple sessions are open.
> 
> 
> Diffs
> -----
> 
>   app/Info.plist.in be256f9 
>   app/main.cpp b5f7bb9 
> 
> Diff: https://git.reviewboard.kde.org/r/126761/diff/
> 
> 
> Testing
> -------
> 
> On OS X 10.9.5 with Qt 5.5.1 and KF5 Frameworks 5.17.0 installed in /opt/local
> 
> 
> Thanks,
> 
> René J.V. Bertin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160119/1efd9361/attachment.html>


More information about the KDevelop-devel mailing list