Remove the functions and access the variable directly.
Change-Id: Ic35d971a618299b6ccf26f9fb0d76de498268cc1
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Removing the bool success makes later refactorings easier to do. The
code flow is the same, except that the block handling failedProjects
after load was always run, even if SessionFile::load returned false.
The only place SessionFile::load returns false failedProjects didn't yet
change, so the code was wrong before.
Change-Id: I8ce565791d67ece7ab8fc7c4a799ed365153e34b
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
I want to get rid of SessionFile, this is the first step.
Only slight coding style reformating has been done.
Change-Id: I57cae8356b9f12229e3f788f2e71f8e1161fc3c7
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
It's easily constructed from sessionName, thus removing one member
Change-Id: I8ae92db0732dada6baa7b50ec84d7b95a16efed6
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Only called in debug output, which is going to change later anyway
Change-Id: I7dd6ec4a30a5d98eeab82cf46276c2811dc0207c
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
There used to be 3 states for the SessionManager:
1) Uninitialized (after ctor)
2) A default virgin session
3) Using a session (including the default session)
And we used to switch from state 1 to 2 or 3 after ICore::coreOpened().
This changes that we start in state 2 and thus don't emit a few signals
after coreOpened. I don't think that'll break anything.
Change-Id: I4cf7dade132c9d0ebd6d472d79c8b70c07acd20f
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
It's only ever called two times and makes it easier to understand how
m_sesionName is changed
Change-Id: I0106516b78481181d7a027a6348eee45e0e462d6
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
To reproduce the bug:
1) Load a project into the default session.cpp
2) Close creator (which saves the session)
3) Start Creator
4) Create a new session and switch to it => This calls createImpl
and overrides the default session, even though it shouldn't
5) Load the default session, which will now be empty
Change-Id: I7c23fba8c1f9fd32cc95b3b9206afc422c1f0133
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This saves one function call compared to the instance()->currentProject()
pattern and is typically less to type on the caller site.
Change-Id: I65568f30205fc90e2aaca7e8e7f0192241df8c85
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This tries to fix inconsistencies concerning the order of some signals
and the corresponding state of the sessions. In particular, it now emittes
aboutToLoadSession *after* aboutToUnloadSession. Also, retrieving the
active session name gives the correct result when updating project files.
In addition, there's a new parameter to aboutToLoadSession which describes
the session being loaded.
Change-Id: Iab5fb21080a7ee9bbf9f4d8958499cbc5549e81e
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
The function is still there but should be remove in my opinion.
Change-Id: I739fe942e74f459faccb80b5bcb8a5721c6bb9bf
Reviewed-on: http://codereview.qt.nokia.com/4200
Reviewed-by: hjk <qthjk@ovi.com>
- last session / current session semantics is back
- Manage Sessions... button is back
This commit changes the behaviour of currentSession()
to return the session name and not the full path.
SessionNodeImpl as the other user has been adjusted
accordingly.
Change-Id: I1dcfbef2fb4dacf3e3906871d816483c2bfb76da
Reviewed-on: http://codereview.qt.nokia.com/1461
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Use the editor's displayName for the window title.
Also there were missing change signal emissions in setDisplayName
implementations.
Moves the actual handling of the window title from Session to
EditorManager (so it now is also done for the hypothetical case of no
project explorer plugin).
Task-number: QTCREATORBUG-3207
Do not save temporary editors in the session. Chances are high
that files opened in those editors are not around when the
session is reopened.
Task-number: QTCREATORBUG-2422