forked from qt-creator/qt-creator
Require parent for SessionNameInputDialog
...so the dialog does not appear as a separate application. Change-Id: I4e9b76bf70f860d7decf8836f6a9885fb5748028 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -186,9 +186,9 @@ void SessionModel::resetSessions()
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
void SessionModel::newSession()
|
||||
void SessionModel::newSession(QWidget *parent)
|
||||
{
|
||||
SessionNameInputDialog sessionInputDialog;
|
||||
SessionNameInputDialog sessionInputDialog(parent);
|
||||
sessionInputDialog.setWindowTitle(tr("New Session Name"));
|
||||
sessionInputDialog.setActionText(tr("&Create"), tr("Create and &Open"));
|
||||
|
||||
@@ -197,9 +197,9 @@ void SessionModel::newSession()
|
||||
});
|
||||
}
|
||||
|
||||
void SessionModel::cloneSession(const QString &session)
|
||||
void SessionModel::cloneSession(QWidget *parent, const QString &session)
|
||||
{
|
||||
SessionNameInputDialog sessionInputDialog;
|
||||
SessionNameInputDialog sessionInputDialog(parent);
|
||||
sessionInputDialog.setWindowTitle(tr("New Session Name"));
|
||||
sessionInputDialog.setActionText(tr("&Clone"), tr("Clone and &Open"));
|
||||
sessionInputDialog.setValue(session + " (2)");
|
||||
@@ -218,9 +218,9 @@ void SessionModel::deleteSession(const QString &session)
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
void SessionModel::renameSession(const QString &session)
|
||||
void SessionModel::renameSession(QWidget *parent, const QString &session)
|
||||
{
|
||||
SessionNameInputDialog sessionInputDialog;
|
||||
SessionNameInputDialog sessionInputDialog(parent);
|
||||
sessionInputDialog.setWindowTitle(tr("Rename Session"));
|
||||
sessionInputDialog.setActionText(tr("&Rename"), tr("Rename and &Open"));
|
||||
sessionInputDialog.setValue(session);
|
||||
|
||||
Reference in New Issue
Block a user