diff options
author | Orgad Shaneh <[email protected]> | 2013-01-24 12:11:01 +0200 |
---|---|---|
committer | Orgad Shaneh <[email protected]> | 2013-01-24 12:32:26 +0100 |
commit | 5551c1e906c617ba1214b97ecdc3a5fa04f71939 (patch) | |
tree | 39a81e28c30306c7f905a310bcf3ee2f5ceb93b0 /src/plugins/vcsbase/vcsbaseplugin.cpp | |
parent | c670a66fe10e20c92f9a7a40d68722f28b3af62b (diff) |
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 <[email protected]>
Diffstat (limited to 'src/plugins/vcsbase/vcsbaseplugin.cpp')
-rw-r--r-- | src/plugins/vcsbase/vcsbaseplugin.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp index 21907765e84..0f3643ed3a5 100644 --- a/src/plugins/vcsbase/vcsbaseplugin.cpp +++ b/src/plugins/vcsbase/vcsbaseplugin.cpp @@ -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); |