From 0a0a620489efd4cfebfb34edc3f4dc60c5e1b1f5 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Mon, 13 Jul 2015 10:29:59 +0200 Subject: [PATCH] Perforce: Diff for files in submit changelist dialog works Perforce repositories configured with P4CONFIG had a bug in the submit dialog, one could not see the differences for the submited files. Change-Id: Ie15fd66667dca1c0863a29e87ff76583d9aa3bbb Task-number: QTCREATORBUG-14538 Reviewed-by: Alexander Drozdov Reviewed-by: Tobias Hunger --- src/plugins/perforce/perforceplugin.cpp | 5 ++--- src/plugins/perforce/perforceplugin.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp index 208530590bb..f12f203526c 100644 --- a/src/plugins/perforce/perforceplugin.cpp +++ b/src/plugins/perforce/perforceplugin.cpp @@ -668,7 +668,7 @@ IEditor *PerforcePlugin::openPerforceSubmitEditor(const QString &fileName, const submitEditor->registerActions(m_undoAction, m_redoAction, m_submitCurrentLogAction, m_diffSelectedFiles); connect(submitEditor, &VcsBaseSubmitEditor::diffSelectedFiles, this, &PerforcePlugin::slotSubmitDiff); - submitEditor->setCheckScriptWorkingDirectory(m_commitWorkingDirectory); + submitEditor->setCheckScriptWorkingDirectory(m_settings.topLevel()); return editor; } @@ -1250,7 +1250,7 @@ IEditor *PerforcePlugin::showOutputInEditor(const QString &title, void PerforcePlugin::slotSubmitDiff(const QStringList &files) { - p4Diff(m_commitWorkingDirectory, files); + p4Diff(m_settings.topLevel(), files); } struct PerforceDiffParameters @@ -1368,7 +1368,6 @@ void PerforcePlugin::cleanCommitMessageFile() if (!m_commitMessageFileName.isEmpty()) { QFile::remove(m_commitMessageFileName); m_commitMessageFileName.clear(); - m_commitWorkingDirectory.clear(); } } diff --git a/src/plugins/perforce/perforceplugin.h b/src/plugins/perforce/perforceplugin.h index 251166a3231..a202b5687f5 100644 --- a/src/plugins/perforce/perforceplugin.h +++ b/src/plugins/perforce/perforceplugin.h @@ -246,7 +246,6 @@ private: bool m_submitActionTriggered; QAction *m_diffSelectedFiles; QString m_commitMessageFileName; - QString m_commitWorkingDirectory; mutable QString m_tempFilePattern; QAction *m_undoAction; QAction *m_redoAction;