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

List:       konsole-devel
Subject:    Re: Review Request 129214: Added possibility to give default dir on Part instantiation
From:       Sven Fischer <sven () leiderfischer ! de>
Date:       2017-01-19 22:13:15
Message-ID: 20170119221315.31352.98961 () mimi ! kde ! org
[Download RAW message or body]

--===============1999738278324318538==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit



> 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
> 
> 


--===============1999738278324318538==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/129214/">https://git.reviewboard.kde.org/r/129214/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On November 7th, 2016, 7:26 nachm. UTC, <b>Kurt \
Hindenburg</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px \
solid #d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">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.</p></pre>  </blockquote>




 <p>On November 7th, 2016, 7:42 nachm. UTC, <b>Sven Fischer</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Hi \
Kurt,</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">I thought I had answered the question, but obviously \
it doesn't show up here...</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">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 </p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">factory = \
KPluginLoader(service-&gt;library()).factory(); </p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">and \
then</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">m_part = factory ? \
(factory-&gt;create&lt;KParts::Part&gt;(parent, defaults)) : 0;</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">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.</p></pre>  \
</blockquote>





 <p>On November 9th, 2016, 1:22 nachm. UTC, <b>Martin Tobias Holmedahl Sandsmark</b> \
wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Maybe use the existing TerminalInterface::showShellInDir() instead? Or \
extend TerminalInterface? I just don't like using opaque QVariant maps with arbitrary \
strings...</p></pre>  </blockquote>





 <p>On Dezember 3rd, 2016, 5:58 nachm. UTC, <b>Kurt Hindenburg</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I \
tend to agree with Martin.  Sven, have you tried using the \
TerminalInterface?</p></pre>  </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Sorry \
for the late reply, have been busy.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">The problem is: <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">showShellInDir()</code> 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 <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">profile-&gt;startInCurrentSessionDir()</code> \
result?</p></pre> <br />










<p>- Sven</p>


<br />
<p>On Oktober 27th, 2016, 6:44 vorm. UTC, Sven Fischer wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for Konsole.</div>
<div>By Sven Fischer.</div>


<p style="color: grey;"><i>Updated Okt. 27, 2016, 6:44 vorm.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
konsole
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">On konsole KPart instantiation, the QVariantList is evaluated for a \
default directory to change to. The Part honors the profile setting &quot;Use same \
directory...&quot;. If it is not set, the directory is ignored.

Simplified the argument parsing

Beautified the source by using C++11 iteration and QVariantMap</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Built a new version of yakuake against this \
konsolepart.so. Worked perfectly.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/Part.cpp <span style="color: \
grey">(7968176f2b977f391b44dc36a9df9597b27aff2d)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/129214/diff/" style="margin-left: \
3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>


--===============1999738278324318538==--


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

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