<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Monaco'; font-size:10pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Hello,</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">I often use KDevelop's "git/show differences" command to start the patch review plugin, so it's rather bothersome that the plugin doesn't close the exact state of the main window upon exit. There's the fact that the documentation window is moved to the rhs (and often opened when it wasn't). Even more annoying is the fact that the very files you were working on (and that were thus included in the patch review) tend not to be open anymore.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">From what I understand, the plugin closes all documents not part of the patch set in updateReview():</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monaco'; color:#141312; background-color:#ffffff;"> Sublime::MainWindow* w = </span><span style=" font-family:'monaco'; font-weight:600; color:#141312;">dynamic_cast</span><span style=" font-family:'monaco'; color:#141312;"><Sublime::MainWindow*>( ICore::self()->uiController()->activeMainWindow() );</span></p>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#ffffff;"><span style=" font-family:'monaco'; color:#141312;"> </span><span style=" font-family:'monaco'; color:#0057ae; background-color:#ffffdd;">//</span><span style=" font-family:'monaco'; color:#888786;"> Close views for documents that were loaded from the working set, but are not in the patch</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#ffffff;"><span style=" font-family:'monaco'; color:#141312;"> </span><span style=" font-family:'monaco'; color:#006e28;">QList</span><span style=" font-family:'monaco'; color:#141312;"><IDocument*> documentsList = documents.values();</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#ffffff;"><span style=" font-family:'monaco'; color:#141312;"> </span><span style=" font-family:'monaco'; font-weight:600; color:#0095ff;">foreach</span><span style=" font-family:'monaco'; color:#141312;">( Sublime::View* view, w->area()->views() ) {</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#ffffff;"><span style=" font-family:'monaco'; color:#141312;"> IDocument* doc = </span><span style=" font-family:'monaco'; font-weight:600; color:#141312;">dynamic_cast</span><span style=" font-family:'monaco'; color:#141312;"><IDocument*>( view->document() );</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#ffffff;"><span style=" font-family:'monaco'; color:#141312;"> </span><span style=" font-family:'monaco'; font-weight:600; color:#141312;">if</span><span style=" font-family:'monaco'; color:#141312;">( doc && documentsList.contains( doc ) ) {</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#ffffff;"><span style=" font-family:'monaco'; color:#141312;"> w->area()->closeView( view );</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#ffffff;"><span style=" font-family:'monaco'; color:#141312;"> }</span></pre>
<pre style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#ffffff;"><span style=" font-family:'monaco'; color:#141312;"> }</span><span style=" font-family:'monaco';"> </span></pre>
<pre style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#ffffff;"><span style=" font-family:'monaco';">but I don't see any explicit action to reopen them in the take-down code.</span></pre>
<pre style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#ffffff;"><span style=" font-family:'monaco';">So how come certain files (not part of the patch set) are reopened, but not (most) files that are part of the patch set?</span></pre>
<pre style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#ffffff;"><span style=" font-family:'monaco';">Thanks,</span></pre>
<pre style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0; background-color:#ffffff;"><span style=" font-family:'monaco';">René</span></pre></body></html>