Commit fe37b278 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Git: Do not crash when closing creator after reverting all files in a commit

Keep the commit editor around and disable it instead of closing it. That stops
Qt Creator from closing the editor when bringing the commit editor to the
foreground to ask whether it should be closed.

Task-number: QTCREATORBUG-12099
Change-Id: I6927424675338f845f504cb6f630f05eaf8ad49f
Reviewed-by: default avatarOrgad Shaneh <>
Reviewed-by: default avatarTobias Hunger <>
parent 93cdde54
......@@ -179,12 +179,16 @@ void GitSubmitEditor::updateFileModel()
QString errorMessage, commitTemplate;
CommitData data(m_commitType);
if (client->getCommitData(m_workingDirectory, &commitTemplate, data, &errorMessage)) {
m_forceClose = false;
} else {
// Nothing to commit left!
m_forceClose = true;
......@@ -53,7 +53,7 @@ public:
void setCommitData(const CommitData &);
GitSubmitEditorPanelData panelData() const;
bool forceClose() const { return m_forceClose; }
bool forceClose() { updateFileModel(); return m_forceClose; }
CommitType commitType() const { return m_commitType; }
QString amendSHA1() const;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment