From 563c542a2f8fda500c9205298a781b2b0297da4d Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Tue, 14 Sep 2010 11:37:54 +0200 Subject: 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 --- src/plugins/projectexplorer/sessiondialog.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/plugins/projectexplorer/sessiondialog.cpp') 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(); -- cgit v1.2.1