D12968: Remove triplicated code

Kurt Hindenburg noreply at phabricator.kde.org
Thu Jun 14 12:40:30 UTC 2018


hindenburg added a comment.


  In D12968#277887 <https://phabricator.kde.org/D12968#277887>, @tcanabrava wrote:
  
  >   > Having a Konsole open and then logging off your desktop; when you log back in, the Konsole should be restored
  >   
  >
  > I found the code that deals with that:
  >
  >   void restoreSession(Application &app)
  >   {
  >       int n = 1;
  >       while (KMainWindow::canBeRestored(n)) {
  >           app.newMainWindow()->restore(n++);
  >       }
  >   }
  >
  
  
  Application::newMainWindow, it calls this
  
    connect(window, &Konsole::MainWindow::newWindowRequest, this,
            &Konsole::Application::createWindow);
  
  createWindow:
  
    MainWindow *window = newMainWindow();
    window->createSession(profile, directory);
    finalizeNewMainWindow(window);

REPOSITORY
  R319 Konsole

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

To: tcanabrava, #konsole, hindenburg
Cc: konsole-devel, herrold, ngraham, maximilianocuria, hindenburg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20180614/6de450a0/attachment.html>


More information about the konsole-devel mailing list