[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:       Kurt Hindenburg <kurt.hindenburg () gmail ! com>
Date:       2016-12-03 17:58:05
Message-ID: 20161203175805.23280.32188 () mimi ! kde ! org
[Download RAW message or body]

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



> On Nov. 7, 2016, 7:26 p.m., 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...

I tend to agree with Martin.  Sven, have you tried using the TerminalInterface?


- Kurt


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


On Oct. 27, 2016, 6:44 a.m., Sven Fischer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129214/
> -----------------------------------------------------------
> 
> (Updated Oct. 27, 2016, 6:44 a.m.)
> 
> 
> 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
> 
> 


--===============0730926120262340654==
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 p.m. 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 p.m. 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 p.m. 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>








</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;">I \
tend to agree with Martin.  Sven, have you tried using the \
TerminalInterface?</p></pre> <br />










<p>- Kurt</p>


<br />
<p>On October 27th, 2016, 6:44 a.m. 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 Oct. 27, 2016, 6:44 a.m.</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>


--===============0730926120262340654==--


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

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