Refactored repositoryFile
FossilOrigin-Name: 880213d7d5ad220ae0a8c453e367d87f069c67b7
This commit is contained in:
parent
e8c8f9e506
commit
a1d60fa19c
16
manifest
16
manifest
@ -1,5 +1,5 @@
|
||||
C Fixed\scurrentWorkspace\nRefactored\s\sprojectName
|
||||
D 2015-04-26T11:33:07.285
|
||||
C Refactored\srepositoryFile\n
|
||||
D 2015-04-26T12:27:51.155
|
||||
F .travis.yml 77966888a81c4ceee1fcc79bce842c9667ad8a35
|
||||
F debian/changelog eb4304dfcb6bb66850ec740838090eb50ce1249b
|
||||
F debian/compat b6abd567fa79cbe0196d093a067271361dc6ca8b
|
||||
@ -185,7 +185,7 @@ F rsrc/icons/fuel.ico eb529ab3332a17b9302ef3e851db5b9ebce2a038
|
||||
F rsrc/icons/fuel.png 40daf53b7f6bdcdd0d6aa5ef433d078ec5ea4342
|
||||
F rsrc/resources.qrc 4098be128fd6c045db933d041fe8844b14643a6f
|
||||
F src/Bridge.cpp b34f14d8d887c9db6b27a84b6423931bf262e7a0
|
||||
F src/Bridge.h 4d761a594415105f765c90baf081e7ae1f48f614
|
||||
F src/Bridge.h 4e32aaea72c4ca2e5703cb8a19b67e233a7b735a
|
||||
F src/BrowserWidget.cpp 8b8f545cdff4a4188edc698a1b4777f5df46f056
|
||||
F src/BrowserWidget.h 764d66aa9a93b890298bd0301097739cb4e16597
|
||||
F src/CloneDialog.cpp 812ef7d361c16da21540b7047c9d4d5e74f18539
|
||||
@ -200,8 +200,8 @@ F src/FileTableView.cpp 5ddf8c391c9a3ac449ec61fb1db837b577afeec2
|
||||
F src/FileTableView.h 03e56d87c2d46411b9762b87f4d301619aaf18df
|
||||
F src/LoggedProcess.cpp 2a1e5c94bc1e57c8984563e66c210e43a14dc60c
|
||||
F src/LoggedProcess.h 85df7c635c807a5a0e8c4763f17a0752aaff7261
|
||||
F src/MainWindow.cpp 1f54b516ab93e11b3ac6019215be70ede4a83f06
|
||||
F src/MainWindow.h 27ec1b2e2925d9b5005a60f9c2546ca0bf724b4c
|
||||
F src/MainWindow.cpp ee9cedf5766d169a0548f0621f939c5bf7a35167
|
||||
F src/MainWindow.h 3b94fb6a1f877c7ab861ae5ab29c4516c09301a4
|
||||
F src/SettingsDialog.cpp a46cff5e5dd425e3dbdd15632abfd5829f5562b4
|
||||
F src/SettingsDialog.h 4e2790f581e991c744ae9f86580f1972b8c7ff43
|
||||
F src/Utils.cpp 9aff456712e4276b49083426301b3b96d3819c77
|
||||
@ -215,7 +215,7 @@ F ui/CommitDialog.ui 6200f6cabdcf40a20812e811be28e0793f82516f
|
||||
F ui/FileActionDialog.ui 89bb4dc2d0b8adcd41adcb11ec65f2028a09a12d
|
||||
F ui/MainWindow.ui 8677f5c8bca5bf7561d5f64bfdd0cef5157c6ac7
|
||||
F ui/SettingsDialog.ui 2b7c2870e0054b0f4106f495d85d02c0b814df8b
|
||||
P a7ac992f6f87abee63c74696cb372a1564250103
|
||||
R 50596001f3be473af30beed2e9989cea
|
||||
P 1d1ec089cdb02738d99efcc66c1b32bb0e3208e0
|
||||
R 8f891191e4c7bf83fb23055f9a6cd4b2
|
||||
U kostas
|
||||
Z 3eeb9c3b313f41a766a406d8d644c6ab
|
||||
Z 5b7acc471a730941f76f2cc8e3fb3853
|
||||
|
@ -1 +1 @@
|
||||
1d1ec089cdb02738d99efcc66c1b32bb0e3208e0
|
||||
880213d7d5ad220ae0a8c453e367d87f069c67b7
|
16
src/Bridge.h
16
src/Bridge.h
@ -72,12 +72,21 @@ public:
|
||||
return projectName;
|
||||
}
|
||||
|
||||
const QString &getRepositoryFile() const
|
||||
{
|
||||
return repositoryFile;
|
||||
}
|
||||
|
||||
void setRepositoryFile(const QString &filename)
|
||||
{
|
||||
repositoryFile = filename;
|
||||
}
|
||||
|
||||
|
||||
bool uiRunning() const;
|
||||
bool startUI(const QString &httpPort);
|
||||
void stopUI();
|
||||
|
||||
QString repositoryFile;
|
||||
|
||||
private:
|
||||
void log(const QString &text, bool isHTML=false)
|
||||
@ -96,9 +105,8 @@ private:
|
||||
QTextBrowser *logTextBrowser;
|
||||
QString currentWorkspace;
|
||||
QString fossilPath; // The value from the settings
|
||||
|
||||
QString projectName;
|
||||
|
||||
QString repositoryFile;
|
||||
QString projectName;
|
||||
|
||||
QProcess fossilUI;
|
||||
};
|
||||
|
@ -355,9 +355,9 @@ bool MainWindow::openWorkspace(const QString &path)
|
||||
return false;
|
||||
}
|
||||
|
||||
repositoryFile = fi.absoluteFilePath();
|
||||
setRepositoryFile(fi.absoluteFilePath());
|
||||
|
||||
if(!runFossil(QStringList() << "open" << QuotePath(repositoryFile)))
|
||||
if(!runFossil(QStringList() << "open" << QuotePath(getRepositoryFile())))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"), tr("Could not open repository."), QMessageBox::Ok );
|
||||
return false;
|
||||
@ -458,10 +458,10 @@ void MainWindow::on_actionNewRepository_triggered()
|
||||
stopUI();
|
||||
on_actionClearLog_triggered();
|
||||
|
||||
repositoryFile = repo_path_info.absoluteFilePath();
|
||||
setRepositoryFile(repo_path_info.absoluteFilePath());
|
||||
|
||||
// Create repository
|
||||
if(!runFossil(QStringList() << "new" << QuotePath(repositoryFile)))
|
||||
if(!runFossil(QStringList() << "new" << QuotePath(getRepositoryFile())))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"), tr("Could not create repository."), QMessageBox::Ok );
|
||||
return;
|
||||
@ -480,7 +480,7 @@ void MainWindow::on_actionNewRepository_triggered()
|
||||
ui->actionViewUnknown->setChecked(true);
|
||||
|
||||
// Open repo
|
||||
if(!runFossil(QStringList() << "open" << QuotePath(repositoryFile)))
|
||||
if(!runFossil(QStringList() << "open" << QuotePath(getRepositoryFile())))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"), tr("Could not open repository."), QMessageBox::Ok );
|
||||
return;
|
||||
@ -733,7 +733,7 @@ void MainWindow::scanWorkspace()
|
||||
QString fullpath = it->absoluteFilePath();
|
||||
|
||||
// Skip fossil files
|
||||
if(filename == FOSSIL_CHECKOUT1 || filename == FOSSIL_CHECKOUT2 || (!repositoryFile.isEmpty() && QFileInfo(fullpath) == QFileInfo(repositoryFile)))
|
||||
if(filename == FOSSIL_CHECKOUT1 || filename == FOSSIL_CHECKOUT2 || (!getRepositoryFile().isEmpty() && QFileInfo(fullpath) == QFileInfo(getRepositoryFile())))
|
||||
continue;
|
||||
|
||||
RepoFile *rf = new RepoFile(*it, RepoFile::TYPE_UNKNOWN, wkdir);
|
||||
@ -1033,7 +1033,7 @@ MainWindow::RepoStatus MainWindow::getRepoStatus()
|
||||
if(key=="project-name")
|
||||
projectName = value;
|
||||
else if(key=="repository")
|
||||
repositoryFile = value;
|
||||
setRepositoryFile(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -258,15 +258,21 @@ private:
|
||||
bool abortOperation;
|
||||
|
||||
Settings &settings;
|
||||
QString repositoryFile;
|
||||
QStringList workspaceHistory;
|
||||
#ifndef BRIDGE_ENABLED
|
||||
QString projectName;
|
||||
QString currentWorkspace;
|
||||
QString repositoryFile;
|
||||
|
||||
const QString & getRepositoryFile() const { return repositoryFile; }
|
||||
void setRepositoryFile(const QString &filename) { repositoryFile = filename; }
|
||||
const QString & getProjectName() const { return projectName; }
|
||||
#else
|
||||
Bridge bridge;
|
||||
const QString & getProjectName() const { return bridge.getProjectName(); }
|
||||
const QString & getRepositoryFile() const { return bridge.getRepositoryFile(); }
|
||||
void setRepositoryFile(const QString &filename) { bridge.setRepositoryFile(filename); }
|
||||
|
||||
#endif
|
||||
ViewMode viewMode;
|
||||
stringset_t selectedDirs; // The directory selected in the tree
|
||||
|
Loading…
x
Reference in New Issue
Block a user