restoring open documents after closing a patch review ("show differences")

Aleix Pol aleixpol at kde.org
Thu Nov 6 02:48:49 UTC 2014


On Fri, Oct 31, 2014 at 2:06 PM, René J.V. <rjvbertin at gmail.com> wrote:

>  Hello,
>
>
>
> 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.
>
>
>
> From what I understand, the plugin closes all documents not part of the
> patch set in updateReview():
>
>
>
> Sublime::MainWindow* w = dynamic_cast<Sublime::MainWindow*>(
> ICore::self()->uiController()->activeMainWindow() );
>
>     // Close views for documents that were loaded from the working set, but are not in the patch
>
>     QList<IDocument*> documentsList = documents.values();
>
>     foreach( Sublime::View* view, w->area()->views() ) {
>
>         IDocument* doc = dynamic_cast<IDocument*>( view->document() );
>
>         if( doc && documentsList.contains( doc ) ) {
>
>             w->area()->closeView( view );
>
>         }
>
>     }
>
> but I don't see any explicit action to reopen them in the take-down code.
>
> So how come certain files (not part of the patch set) are reopened, but not (most) files that are part of the patch set?
>
> Thanks,
>
> René
>
> Hi René,
It looks like you're hitting a bug. Going back from the review area should
restore the document set indeed.

Aleix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20141106/2cbba0e6/attachment.html>


More information about the KDevelop-devel mailing list