forked from qt-creator/qt-creator
Adapt to upstream FileName changes
Change-Id: I5b2a3ec17024fdc569df0c65f8d48564d5a3afea Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -643,9 +643,9 @@ bool FossilClient::synchronousCreateRepository(const QString &workingDirectory,
|
|||||||
// @TODO: handle spaces in the path
|
// @TODO: handle spaces in the path
|
||||||
// @TODO: what about --template options?
|
// @TODO: what about --template options?
|
||||||
|
|
||||||
const FileName fullRepoName = FileName::fromStringWithExtension(repoName, Constants::FOSSIL_FILE_SUFFIX);
|
const FilePath fullRepoName = FilePath::fromStringWithExtension(repoName, Constants::FOSSIL_FILE_SUFFIX);
|
||||||
const FileName repoFilePath = FileName::fromString(repoPath)
|
const FilePath repoFilePath = FilePath::fromString(repoPath)
|
||||||
.appendPath(fullRepoName.toString());
|
.pathAppended(fullRepoName.toString());
|
||||||
QStringList args(vcsCommandString(CreateRepositoryCommand));
|
QStringList args(vcsCommandString(CreateRepositoryCommand));
|
||||||
if (!adminUser.isEmpty())
|
if (!adminUser.isEmpty())
|
||||||
args << "--admin-user" << adminUser;
|
args << "--admin-user" << adminUser;
|
||||||
@@ -814,11 +814,11 @@ VcsBase::VcsBaseEditorWidget *FossilClient::annotate(
|
|||||||
return fossilEditor;
|
return fossilEditor;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FossilClient::isVcsFileOrDirectory(const FileName &fileName) const
|
bool FossilClient::isVcsFileOrDirectory(const FilePath &filePath) const
|
||||||
{
|
{
|
||||||
// false for any dir or file other than fossil checkout db-file
|
// false for any dir or file other than fossil checkout db-file
|
||||||
return fileName.toFileInfo().isFile()
|
return filePath.toFileInfo().isFile()
|
||||||
&& !fileName.fileName().compare(Constants::FOSSILREPO,
|
&& !filePath.fileName().compare(Constants::FOSSILREPO,
|
||||||
HostOsInfo::fileNameCaseSensitivity());
|
HostOsInfo::fileNameCaseSensitivity());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public:
|
|||||||
const QStringList &extraOptions = QStringList()) final;
|
const QStringList &extraOptions = QStringList()) final;
|
||||||
void revertAll(const QString &workingDir, const QString &revision = QString(),
|
void revertAll(const QString &workingDir, const QString &revision = QString(),
|
||||||
const QStringList &extraOptions = QStringList()) final;
|
const QStringList &extraOptions = QStringList()) final;
|
||||||
bool isVcsFileOrDirectory(const Utils::FileName &fileName) const;
|
bool isVcsFileOrDirectory(const Utils::FilePath &filePath) const;
|
||||||
QString findTopLevelForFile(const QFileInfo &file) const final;
|
QString findTopLevelForFile(const QFileInfo &file) const final;
|
||||||
bool managesFile(const QString &workingDirectory, const QString &fileName) const;
|
bool managesFile(const QString &workingDirectory, const QString &fileName) const;
|
||||||
unsigned int binaryVersion() const;
|
unsigned int binaryVersion() const;
|
||||||
|
|||||||
@@ -81,9 +81,9 @@ Core::Id FossilControl::id() const
|
|||||||
return Core::Id(Constants::VCS_ID_FOSSIL);
|
return Core::Id(Constants::VCS_ID_FOSSIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FossilControl::isVcsFileOrDirectory(const Utils::FileName &fileName) const
|
bool FossilControl::isVcsFileOrDirectory(const Utils::FilePath &filePath) const
|
||||||
{
|
{
|
||||||
return m_client->isVcsFileOrDirectory(fileName);
|
return m_client->isVcsFileOrDirectory(filePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FossilControl::managesDirectory(const QString &directory, QString *topLevel) const
|
bool FossilControl::managesDirectory(const QString &directory, QString *topLevel) const
|
||||||
@@ -102,7 +102,7 @@ bool FossilControl::managesFile(const QString &workingDirectory, const QString &
|
|||||||
|
|
||||||
bool FossilControl::isConfigured() const
|
bool FossilControl::isConfigured() const
|
||||||
{
|
{
|
||||||
const Utils::FileName binary = m_client->vcsBinary();
|
const Utils::FilePath binary = m_client->vcsBinary();
|
||||||
if (binary.isEmpty())
|
if (binary.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ bool FossilControl::vcsAnnotate(const QString &file, int line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Core::ShellCommand *FossilControl::createInitialCheckoutCommand(const QString &sourceUrl,
|
Core::ShellCommand *FossilControl::createInitialCheckoutCommand(const QString &sourceUrl,
|
||||||
const Utils::FileName &baseDirectory,
|
const Utils::FilePath &baseDirectory,
|
||||||
const QString &localName,
|
const QString &localName,
|
||||||
const QStringList &extraArgs)
|
const QStringList &extraArgs)
|
||||||
{
|
{
|
||||||
@@ -199,11 +199,11 @@ Core::ShellCommand *FossilControl::createInitialCheckoutCommand(const QString &s
|
|||||||
// -- open/checkout an existing local fossil
|
// -- open/checkout an existing local fossil
|
||||||
// Clone URL is an absolute local path and is the same as the local fossil.
|
// Clone URL is an absolute local path and is the same as the local fossil.
|
||||||
|
|
||||||
const QString checkoutPath = Utils::FileName(baseDirectory).appendPath(localName).toString();
|
const QString checkoutPath = baseDirectory.pathAppended(localName).toString();
|
||||||
const QString fossilFile = options.value("fossil-file");
|
const QString fossilFile = options.value("fossil-file");
|
||||||
const Utils::FileName fossilFileName = Utils::FileName::fromUserInput(QDir::fromNativeSeparators(fossilFile));
|
const Utils::FilePath fossilFilePath = Utils::FilePath::fromUserInput(QDir::fromNativeSeparators(fossilFile));
|
||||||
const QString fossilFileNative = fossilFileName.toUserOutput();
|
const QString fossilFileNative = fossilFilePath.toUserOutput();
|
||||||
const QFileInfo cloneRepository(fossilFileName.toString());
|
const QFileInfo cloneRepository(fossilFilePath.toString());
|
||||||
|
|
||||||
// Check when requested to clone a local repository and clone-into repository file is the same
|
// Check when requested to clone a local repository and clone-into repository file is the same
|
||||||
// or not specified.
|
// or not specified.
|
||||||
@@ -235,14 +235,14 @@ Core::ShellCommand *FossilControl::createInitialCheckoutCommand(const QString &s
|
|||||||
&& !cloneRepository.exists()) {
|
&& !cloneRepository.exists()) {
|
||||||
|
|
||||||
const QString sslIdentityFile = options.value("ssl-identity");
|
const QString sslIdentityFile = options.value("ssl-identity");
|
||||||
const Utils::FileName sslIdentityFileName = Utils::FileName::fromUserInput(QDir::fromNativeSeparators(sslIdentityFile));
|
const Utils::FilePath sslIdentityFilePath = Utils::FilePath::fromUserInput(QDir::fromNativeSeparators(sslIdentityFile));
|
||||||
const bool includePrivate = (options.value("include-private") == "true");
|
const bool includePrivate = (options.value("include-private") == "true");
|
||||||
|
|
||||||
QStringList extraOptions;
|
QStringList extraOptions;
|
||||||
if (includePrivate)
|
if (includePrivate)
|
||||||
extraOptions << "--private";
|
extraOptions << "--private";
|
||||||
if (!sslIdentityFile.isEmpty())
|
if (!sslIdentityFile.isEmpty())
|
||||||
extraOptions << "--ssl-identity" << sslIdentityFileName.toUserOutput();
|
extraOptions << "--ssl-identity" << sslIdentityFilePath.toUserOutput();
|
||||||
if (!adminUser.isEmpty())
|
if (!adminUser.isEmpty())
|
||||||
extraOptions << "--admin-user" << adminUser;
|
extraOptions << "--admin-user" << adminUser;
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public:
|
|||||||
QString displayName() const final;
|
QString displayName() const final;
|
||||||
Core::Id id() const final;
|
Core::Id id() const final;
|
||||||
|
|
||||||
bool isVcsFileOrDirectory(const Utils::FileName &fileName) const final;
|
bool isVcsFileOrDirectory(const Utils::FilePath &filePath) const final;
|
||||||
bool managesDirectory(const QString &filename, QString *topLevel = 0) const final;
|
bool managesDirectory(const QString &filename, QString *topLevel = 0) const final;
|
||||||
bool managesFile(const QString &workingDirectory, const QString &fileName) const final;
|
bool managesFile(const QString &workingDirectory, const QString &fileName) const final;
|
||||||
bool isConfigured() const final;
|
bool isConfigured() const final;
|
||||||
@@ -60,7 +60,7 @@ public:
|
|||||||
bool vcsCreateRepository(const QString &directory) final;
|
bool vcsCreateRepository(const QString &directory) final;
|
||||||
bool vcsAnnotate(const QString &file, int line) final;
|
bool vcsAnnotate(const QString &file, int line) final;
|
||||||
Core::ShellCommand *createInitialCheckoutCommand(const QString &sourceUrl,
|
Core::ShellCommand *createInitialCheckoutCommand(const QString &sourceUrl,
|
||||||
const Utils::FileName &baseDirectory,
|
const Utils::FilePath &baseDirectory,
|
||||||
const QString &localName,
|
const QString &localName,
|
||||||
const QStringList &extraArgs) final;
|
const QStringList &extraArgs) final;
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ bool FossilPlugin::initialize(const QStringList &arguments, QString *errorMessag
|
|||||||
|
|
||||||
m_commandLocator = new Core::CommandLocator("Fossil", "fossil", "fossil", this);
|
m_commandLocator = new Core::CommandLocator("Fossil", "fossil", "fossil", this);
|
||||||
|
|
||||||
ProjectExplorer::JsonWizardFactory::addWizardPath(Utils::FileName::fromString(Constants::WIZARD_PATH));
|
ProjectExplorer::JsonWizardFactory::addWizardPath(Utils::FilePath::fromString(Constants::WIZARD_PATH));
|
||||||
Core::JsExpander::registerGlobalObject<FossilJsExtension>("Fossil");
|
Core::JsExpander::registerGlobalObject<FossilJsExtension>("Fossil");
|
||||||
|
|
||||||
createMenu(context);
|
createMenu(context);
|
||||||
|
|||||||
Reference in New Issue
Block a user