aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRobert Loehning <[email protected]>2018-01-23 19:02:46 +0100
committerRobert Loehning <[email protected]>2018-01-24 17:48:47 +0000
commite7d44054e151beacf4f4d4cc582ff2618c9a8914 (patch)
tree1539658498351bd97adc5b97ffc75a57fed064d7 /src
parent561773ce2bbf69b040fdd7d245a89e469745444a (diff)
Require parent for SessionNameInputDialog
...so the dialog does not appear as a separate application. Change-Id: I4e9b76bf70f860d7decf8836f6a9885fb5748028 Reviewed-by: Eike Ziller <[email protected]> Reviewed-by: Tobias Hunger <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/projectexplorer/projectwelcomepage.cpp4
-rw-r--r--src/plugins/projectexplorer/sessiondialog.h2
-rw-r--r--src/plugins/projectexplorer/sessionmodel.cpp12
-rw-r--r--src/plugins/projectexplorer/sessionmodel.h6
-rw-r--r--src/plugins/projectexplorer/sessionview.cpp6
5 files changed, 15 insertions, 15 deletions
diff --git a/src/plugins/projectexplorer/projectwelcomepage.cpp b/src/plugins/projectexplorer/projectwelcomepage.cpp
index f1eb287048d..141f6e55a3a 100644
--- a/src/plugins/projectexplorer/projectwelcomepage.cpp
+++ b/src/plugins/projectexplorer/projectwelcomepage.cpp
@@ -385,9 +385,9 @@ public:
if (m_activeSwitchToRect.contains(pos))
sessionModel->switchToSession(sessionName);
else if (m_activeActionRects[0].contains(pos))
- sessionModel->cloneSession(sessionName);
+ sessionModel->cloneSession(ICore::mainWindow(), sessionName);
else if (m_activeActionRects[1].contains(pos))
- sessionModel->renameSession(sessionName);
+ sessionModel->renameSession(ICore::mainWindow(), sessionName);
else if (m_activeActionRects[2].contains(pos))
sessionModel->deleteSession(sessionName);
return true;
diff --git a/src/plugins/projectexplorer/sessiondialog.h b/src/plugins/projectexplorer/sessiondialog.h
index e1ced4884d1..654736694ed 100644
--- a/src/plugins/projectexplorer/sessiondialog.h
+++ b/src/plugins/projectexplorer/sessiondialog.h
@@ -59,7 +59,7 @@ class SessionNameInputDialog : public QDialog
Q_OBJECT
public:
- explicit SessionNameInputDialog(QWidget *parent = nullptr);
+ explicit SessionNameInputDialog(QWidget *parent);
void setActionText(const QString &actionText, const QString &openActionText);
void setValue(const QString &value);
diff --git a/src/plugins/projectexplorer/sessionmodel.cpp b/src/plugins/projectexplorer/sessionmodel.cpp
index 1f6064ffe4d..21b3ec3f48a 100644
--- a/src/plugins/projectexplorer/sessionmodel.cpp
+++ b/src/plugins/projectexplorer/sessionmodel.cpp
@@ -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);
diff --git a/src/plugins/projectexplorer/sessionmodel.h b/src/plugins/projectexplorer/sessionmodel.h
index 92c0f8b6aba..7feff2b433e 100644
--- a/src/plugins/projectexplorer/sessionmodel.h
+++ b/src/plugins/projectexplorer/sessionmodel.h
@@ -70,10 +70,10 @@ signals:
public slots:
void resetSessions();
- void newSession();
- void cloneSession(const QString &session);
+ void newSession(QWidget *parent);
+ void cloneSession(QWidget *parent, const QString &session);
void deleteSession(const QString &session);
- void renameSession(const QString &session);
+ void renameSession(QWidget *parent, const QString &session);
void switchToSession(const QString &session);
private:
diff --git a/src/plugins/projectexplorer/sessionview.cpp b/src/plugins/projectexplorer/sessionview.cpp
index ae72e34db50..3f99aa6794c 100644
--- a/src/plugins/projectexplorer/sessionview.cpp
+++ b/src/plugins/projectexplorer/sessionview.cpp
@@ -89,7 +89,7 @@ SessionView::SessionView(QWidget *parent)
void SessionView::createNewSession()
{
- m_sessionModel.newSession();
+ m_sessionModel.newSession(this);
}
void SessionView::deleteCurrentSession()
@@ -99,12 +99,12 @@ void SessionView::deleteCurrentSession()
void SessionView::cloneCurrentSession()
{
- m_sessionModel.cloneSession(currentSession());
+ m_sessionModel.cloneSession(this, currentSession());
}
void SessionView::renameCurrentSession()
{
- m_sessionModel.renameSession(currentSession());
+ m_sessionModel.renameSession(this, currentSession());
}
void SessionView::switchToCurrentSession()