diff options
author | Tobias Hunger <tobias.hunger@nokia.com> | 2010-09-14 11:37:54 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@nokia.com> | 2010-09-14 17:26:49 +0200 |
commit | 563c542a2f8fda500c9205298a781b2b0297da4d (patch) | |
tree | 1c429b24c063729732b62aba3a1b3a0ba5c6bebd /src/plugins/projectexplorer/sessiondialog.cpp | |
parent | b85597da6f120c339a6c6d47611992e44fe4b1bc (diff) | |
download | qt-creator-563c542a2f8fda500c9205298a781b2b0297da4d.tar.gz |
Add option to restore last session at startup
* Add an option to the session manager to restore the last
session on startup of creator.
* Align close button on session manager dialog with the other
buttons.
* Clean up handling of session restoration in the ProjectExplorer:
Move all the relevant code into determineSessionToRestoreAtStartup,
since most was there already.
Task-number: QTCREATORBUG-2324
Diffstat (limited to 'src/plugins/projectexplorer/sessiondialog.cpp')
-rw-r--r-- | src/plugins/projectexplorer/sessiondialog.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/sessiondialog.cpp b/src/plugins/projectexplorer/sessiondialog.cpp index 0590447c3a..fa5405cec1 100644 --- a/src/plugins/projectexplorer/sessiondialog.cpp +++ b/src/plugins/projectexplorer/sessiondialog.cpp @@ -149,6 +149,17 @@ SessionDialog::SessionDialog(SessionManager *sessionManager) markItems(); } +void SessionDialog::setAutoLoadSession(bool check) +{ + m_ui.autoLoadCheckBox->setChecked(check ? Qt::Checked : Qt::Unchecked); +} + +bool SessionDialog::autoLoadSession() const +{ + return m_ui.autoLoadCheckBox->checkState() == Qt::Checked; +} + + void SessionDialog::addItems(bool setDefaultSession) { QStringList sessions = m_sessionManager->sessions(); |