Refactored and unified workspace path functions

FossilOrigin-Name: 5e89247bf2fa2cf6d5720ddf51e091319ab66459
This commit is contained in:
Kostas
2015-08-14 10:00:31 +00:00
parent 0f4ff6d3c9
commit 48ed97dc10
8 changed files with 43 additions and 51 deletions

View File

@@ -32,7 +32,7 @@ void Workspace::clearState()
//------------------------------------------------------------------------------
void Workspace::storeWorkspace(QSettings &store)
{
QString workspace = fossil().getCurrentWorkspace();
QString workspace = fossil().getWorkspacePath();
if(workspace.isEmpty())
return;
@@ -66,7 +66,7 @@ bool Workspace::switchWorkspace(const QString& workspace, QSettings &store)
clearState();
remotes.clear();
fossil().setCurrentWorkspace("");
fossil().setWorkspacePath("");
if(workspace.isEmpty())
return true;
@@ -75,7 +75,7 @@ bool Workspace::switchWorkspace(const QString& workspace, QSettings &store)
if(!QDir::setCurrent(new_workspace))
return false;
fossil().setCurrentWorkspace(new_workspace);
fossil().setWorkspacePath(new_workspace);
// Load Remotes
QString workspace_hash = HashString(QDir::toNativeSeparators(new_workspace));
@@ -161,7 +161,7 @@ void Workspace::scanWorkspace(bool scanLocal, bool scanIgnored, bool scanModifie
{
// Scan all workspace files
QFileInfoList all_files;
QString wkdir = fossil().getCurrentWorkspace();
QString wkdir = fossil().getWorkspacePath();
if(wkdir.isEmpty())
return;