Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
49672804
Commit
49672804
authored
Jul 31, 2009
by
Erik Verbruggen
Browse files
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
parents
4a0da2c6
8f869c30
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/sessiondialog.cpp
View file @
49672804
...
...
@@ -110,6 +110,11 @@ SessionDialog::SessionDialog(SessionManager *sessionManager, const QString &last
{
m_ui
.
setupUi
(
this
);
QPushButton
*
switchButton
=
m_ui
.
buttonBox
->
addButton
(
tr
(
"Switch to session"
),
QDialogButtonBox
::
AcceptRole
);
connect
(
switchButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
switchToSession
()));
connect
(
m_ui
.
btCreateNew
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
createNew
()));
...
...
@@ -143,18 +148,6 @@ void SessionDialog::updateActions()
m_ui
.
btDelete
->
setEnabled
(
enableDelete
);
}
void
SessionDialog
::
accept
()
{
// do nothing
QDialog
::
accept
();
}
void
SessionDialog
::
reject
()
{
// clear list
QDialog
::
reject
();
}
void
SessionDialog
::
createNew
()
{
NewSessionInputDialog
newSessionInputDialog
(
m_sessionManager
->
sessions
());
...
...
@@ -192,6 +185,15 @@ void SessionDialog::remove()
m_ui
.
sessionList
->
addItems
(
m_sessionManager
->
sessions
());
}
void
SessionDialog
::
switchToSession
()
{
if
(
m_ui
.
sessionList
->
currentItem
())
{
QString
session
=
m_ui
.
sessionList
->
currentItem
()
->
text
();
m_sessionManager
->
loadSession
(
session
);
}
accept
();
}
}
// namespace Internal
}
// namespace ProjectExplorer
...
...
src/plugins/projectexplorer/sessiondialog.h
View file @
49672804
...
...
@@ -47,13 +47,11 @@ class SessionDialog : public QDialog
public:
SessionDialog
(
SessionManager
*
sessionManager
,
const
QString
&
lastSession
,
bool
startup
);
void
accept
();
void
reject
();
private
slots
:
void
createNew
();
void
clone
();
void
remove
();
void
switchToSession
();
void
updateActions
();
...
...
src/plugins/projectexplorer/sessiondialog.ui
View file @
49672804
...
...
@@ -65,7 +65,7 @@
<item
row=
"1"
column=
"1"
colspan=
"2"
>
<widget
class=
"QDialogButtonBox"
name=
"buttonBox"
>
<property
name=
"standardButtons"
>
<set>
QDialogButtonBox::C
ancel|QDialogButtonBox::Ok
</set>
<set>
QDialogButtonBox::C
lose
</set>
</property>
</widget>
</item>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment