Git: Introduce StashGuard

Offers the user to stash changes (if relevant), stores
the results and pops the stash when it goes out of scope
(unless disabled)

Change-Id: Ibc0d2a5d3e3c953062fb17ecba903ca814524837
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2013-01-24 12:11:01 +02:00
parent c670a66fe1
commit 5551c1e906
8 changed files with 102 additions and 86 deletions

View File

@@ -409,6 +409,15 @@ QString VcsBasePluginState::topLevel() const
return hasFile() ? data->m_state.currentFileTopLevel : data->m_state.currentProjectTopLevel;
}
QString VcsBasePluginState::currentDirectoryOrTopLevel() const
{
if (hasFile())
return data->m_state.currentFileDirectory;
else if (data->m_state.hasProject())
return data->m_state.currentProjectTopLevel;
return QString();
}
bool VcsBasePluginState::equals(const Internal::State &rhs) const
{
return data->m_state.equals(rhs);