aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/perforce
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2017-09-08 12:52:35 +0200
committerTobias Hunger <tobias.hunger@qt.io>2017-09-12 10:04:20 +0000
commit21ab4c427c160eafd5550ff46944ee5be23bd7a5 (patch)
treededcd6f5273f1c05d1fa2199906ef1bcf3ac736f /src/plugins/perforce
parent1e3b5418eac08df5292913e7ff8841972b72695e (diff)
VCS: Offer to save-all before commit
Task-number: QTCREATORBUG-3857 Change-Id: I3ff3d90803eec4134b9da4af5567753ad7bffafb Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/perforce')
-rw-r--r--src/plugins/perforce/perforceplugin.cpp7
-rw-r--r--src/plugins/perforce/perforceplugin.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp
index c4a1e50ac46..0278cd6403c 100644
--- a/src/plugins/perforce/perforceplugin.cpp
+++ b/src/plugins/perforce/perforceplugin.cpp
@@ -556,6 +556,8 @@ void PerforcePlugin::printOpenedFileList()
void PerforcePlugin::startSubmitProject()
{
+ if (!promptBeforeCommit())
+ return;
if (raiseSubmitEditor())
return;
@@ -1225,6 +1227,11 @@ void PerforceDiffConfig::triggerReRun()
emit reRunDiff(effectiveParameters);
}
+QString PerforcePlugin::commitDisplayName() const
+{
+ return tr("submit", "\"commit\" action for perforce");
+}
+
void PerforcePlugin::p4Diff(const QString &workingDir, const QStringList &files)
{
PerforceDiffParameters p;
diff --git a/src/plugins/perforce/perforceplugin.h b/src/plugins/perforce/perforceplugin.h
index ae90276f977..814969537ad 100644
--- a/src/plugins/perforce/perforceplugin.h
+++ b/src/plugins/perforce/perforceplugin.h
@@ -113,6 +113,7 @@ private slots:
#endif
private:
+ QString commitDisplayName() const final;
void p4Diff(const PerforceDiffParameters &p);
void openCurrentFile();