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



 <p>Ship it!</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I think this is OK. I see the problem you're trying to fix, and I think this will work.

It's possibly not the best approach. See comment below.</pre>
 <br />







<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://git.reviewboard.kde.org/r/117499/diff/1/?file=264758#file264758line92" style="color: black; font-weight: bold; text-decoration: underline;">ksmserver/screenlocker/greeter/themes/org.kde.passworddialog/contents/ui/main.qml</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">91</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="k">onSwitchUserClicked:</span> <span class="p">{</span> <span class="nx">mainStack</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx"><span class="hl">u</span>serSessionsUI</span><span class="p">);</span> <span class="nx">userSessionsUI</span><span class="p">.</span><span class="nx">forceActiveFocus</span><span class="p">();</span> <span class="p">}</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">92</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="k">onSwitchUserClicked:</span> <span class="p">{</span> <span class="nx">mainStack</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx"><span class="hl">getU</span>serSessionsUI</span><span class="p"><span class="hl">()</span>);</span> <span class="nx">userSessionsUI<span class="hl">Instance</span></span><span class="p">.</span><span class="nx">forceActiveFocus</span><span class="p">();</span> <span class="p">}</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Page stack can take a component so this can become

.push(userSessionsUIComponent)
and then kill the function and bonus property.

Having functions and pseudo singleton instance isn't very QML'y.
That would mean reworking the Sessions object so that switchUserSupported works.</pre>
</div>
<br />



<p>- David Edmundson</p>


<br />
<p>On April 22nd, 2014, 10:53 a.m. UTC, Felix Geyer wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Plasma, Thomas Lübking and Wolfgang Bauer.</div>
<div>By Felix Geyer.</div>


<p style="color: grey;"><i>Updated April 22, 2014, 10:53 a.m.</i></p>







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


 <a href="http://bugs.kde.org/show_bug.cgi?id=331761">331761</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kde-workspace
</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;">The user switichting dialog from the screen locker is destroyed when the cancel button is pressed.
As a result you can't open it again.

The screen locker uses a PlasmaComponents.PageStack to show the password input and user switching dialogs.
When a dialog is popped from the stack it is destroyed by PageStack.

This change fixes this by creating a new instance of userSessionsUI before it is pushed to the stack.
Additionally the switchUserEnabled property is set once when the screen locker is created as userSessionsUIInstance
doesn't always exist. </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;">- Lock the screen
- Press "Switch user"
- Press "Cancel"
- With this patch the "Switch user" button is visible and functional.</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>ksmserver/screenlocker/greeter/themes/org.kde.passworddialog/contents/ui/main.qml <span style="color: grey">(0d3c7d5)</span></li>

</ul>

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







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








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