Review Request 129214: Added possibility to give default dir on Part instantiation
Sven Fischer
sven at leiderfischer.de
Thu Jan 19 22:13:15 UTC 2017
> On Nov. 7, 2016, 7:26 nachm., Kurt Hindenburg wrote:
> > Thanks - can you answer Martin's question and provide the yakuake code that is calling this? I don't object to the code, I want to double-check what you're doing.
>
> Sven Fischer wrote:
> Hi Kurt,
>
> I thought I had answered the question, but obviously it doesn't show up here...
>
> For the code: Please have a look at https://git.reviewboard.kde.org/r/129215/diff/1#index_header, file app/terminal.cpp. The Part is instantiated by
>
> factory = KPluginLoader(service->library()).factory();
>
> and then
>
> m_part = factory ? (factory->create<KParts::Part>(parent, defaults)) : 0;
>
> So the defaults parameter is the one to use - in yakuake there is no direct inclusion of the Part header, which is indeed the idea behind the PluginLoader factory. That's the reason why I'm not able to use createSession.
>
> Martin Tobias Holmedahl Sandsmark wrote:
> Maybe use the existing TerminalInterface::showShellInDir() instead? Or extend TerminalInterface? I just don't like using opaque QVariant maps with arbitrary strings...
>
> Kurt Hindenburg wrote:
> I tend to agree with Martin. Sven, have you tried using the TerminalInterface?
Sorry for the late reply, have been busy.
The problem is: `showShellInDir()` works perfectly, but I have to consider the settings of konsole. If the profile option "start in same subfolder" is not set, I am not supposed to change the dir. So somehow I have to tell yakuake to change the directory or not. Do you have an idea how to export this option to yakuake or should I add another default option to "showShellInDir" to honor the `profile->startInCurrentSessionDir()` result?
- Sven
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129214/#review100697
-----------------------------------------------------------
On Okt. 27, 2016, 6:44 vorm., Sven Fischer wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129214/
> -----------------------------------------------------------
>
> (Updated Okt. 27, 2016, 6:44 vorm.)
>
>
> Review request for Konsole.
>
>
> Repository: konsole
>
>
> Description
> -------
>
> On konsole KPart instantiation, the QVariantList is evaluated for a
> default directory to change to. The Part honors the profile setting "Use
> same directory...". If it is not set, the directory is ignored.
>
> Simplified the argument parsing
>
> Beautified the source by using C++11 iteration and QVariantMap
>
>
> Diffs
> -----
>
> src/Part.cpp 7968176f2b977f391b44dc36a9df9597b27aff2d
>
> Diff: https://git.reviewboard.kde.org/r/129214/diff/
>
>
> Testing
> -------
>
> Built a new version of yakuake against this konsolepart.so. Worked perfectly.
>
>
> Thanks,
>
> Sven Fischer
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20170119/bcbcdd84/attachment.html>
More information about the konsole-devel
mailing list