forked from qt-creator/qt-creator
refactor sessiondialog a bit
- made code more local by moving clicked slot to lambda - use class initializations - move default value inside the constructor to reduce arguments Change-Id: I98735a0b4c69ea538ed1af6133ef1054039a1b11 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -224,7 +224,7 @@ void SessionModel::switchToSession(const QString &session)
|
||||
|
||||
void SessionModel::runNewSessionDialog(const QString &suggestedName, std::function<void(const QString &)> createSession)
|
||||
{
|
||||
SessionNameInputDialog newSessionInputDialog(SessionManager::sessions(), nullptr);
|
||||
SessionNameInputDialog newSessionInputDialog;
|
||||
newSessionInputDialog.setWindowTitle(tr("New Session Name"));
|
||||
newSessionInputDialog.setValue(suggestedName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user