D5183: Reopen accidentally closed tab

Aleix Pol Gonzalez noreply at phabricator.kde.org
Fri Apr 7 23:55:47 UTC 2017


apol requested changes to this revision.
apol added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> reopenaction.cpp:34
> +
> +ReopenAction::ReopenAction()
> +    :QObject(), d(new ReopenActionPrivate())

Why is it called action? It makes it look like it inherits QAction.

Or actually, make it inherit it! note it's only instantiated once and then coupled with the action.

> reopenaction.cpp:49
> +        QUrl doc = d->reopenFilesStack.pop();
> +        emit newTabRequested(doc);
> +    }

Why don't we just call `ICore::self()->documentController()->openDocument(doc)` here? We'll avoid all this tampering with the shell and sublime.

It's what this all ends up doing anyway.

> reopenaction.cpp:63
> +
> +        d->reopenFilesStack.push(urlDocument->url());
> +    }

We should probably include more information than the url here, like the cursor position and even viewport.

REVISION DETAIL
  https://phabricator.kde.org/D5183

To: coopht, mwolff, #kdevelop, apol
Cc: apol, kossebau, mwolff, brauch, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170407/1635d5fc/attachment.html>


More information about the KDevelop-devel mailing list