forked from qt-creator/qt-creator
VCS: Offer to save-all before commit
Task-number: QTCREATORBUG-3857 Change-Id: I3ff3d90803eec4134b9da4af5567753ad7bffafb Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -641,6 +641,16 @@ bool VcsBasePlugin::enableMenuAction(ActionState as, QAction *menuAction) const
|
||||
return true;
|
||||
}
|
||||
|
||||
QString VcsBasePlugin::commitDisplayName() const
|
||||
{
|
||||
return tr("commit", "name of \"commit\" action of the VCS.");
|
||||
}
|
||||
|
||||
bool VcsBasePlugin::promptBeforeCommit()
|
||||
{
|
||||
return DocumentManager::saveAllModifiedDocuments(tr("Save before %1?").arg(commitDisplayName());
|
||||
}
|
||||
|
||||
void VcsBasePlugin::promptToDeleteCurrentFile()
|
||||
{
|
||||
const VcsBasePluginState state = currentState();
|
||||
|
||||
Reference in New Issue
Block a user