Commit 434ecd62 authored by Tobias Hunger's avatar Tobias Hunger

Vcs: Use Utils::FileName where possible in the CheckoutWizards

Change-Id: I7e90f2c3468099229620d6713b39b69d8dbe8ff0
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 33878202
...@@ -51,7 +51,7 @@ CloneWizardFactory::CloneWizardFactory() ...@@ -51,7 +51,7 @@ CloneWizardFactory::CloneWizardFactory()
setDisplayName(tr("Bazaar Clone (Or Branch)")); setDisplayName(tr("Bazaar Clone (Or Branch)"));
} }
VcsBase::BaseCheckoutWizard *CloneWizardFactory::create(const QString &path, QWidget *parent) const VcsBase::BaseCheckoutWizard *CloneWizardFactory::create(const Utils::FileName &path, QWidget *parent) const
{ {
return new CloneWizard(path, parent); return new CloneWizard(path, parent);
} }
...@@ -60,7 +60,7 @@ VcsBase::BaseCheckoutWizard *CloneWizardFactory::create(const QString &path, QWi ...@@ -60,7 +60,7 @@ VcsBase::BaseCheckoutWizard *CloneWizardFactory::create(const QString &path, QWi
// CloneWizard: // CloneWizard:
// -------------------------------------------------------------------- // --------------------------------------------------------------------
CloneWizard::CloneWizard(const QString &path, QWidget *parent) : CloneWizard::CloneWizard(const Utils::FileName &path, QWidget *parent) :
VcsBase::BaseCheckoutWizard(path, parent) VcsBase::BaseCheckoutWizard(path, parent)
{ {
setTitle(tr("Cloning")); setTitle(tr("Cloning"));
...@@ -70,11 +70,11 @@ CloneWizard::CloneWizard(const QString &path, QWidget *parent) : ...@@ -70,11 +70,11 @@ CloneWizard::CloneWizard(const QString &path, QWidget *parent) :
if (!vc->isConfigured()) if (!vc->isConfigured())
addPage(new VcsBase::VcsConfigurationPage(vc)); addPage(new VcsBase::VcsConfigurationPage(vc));
CloneWizardPage *page = new CloneWizardPage; CloneWizardPage *page = new CloneWizardPage;
page->setPath(path); page->setPath(path.toString());
addPage(page); addPage(page);
} }
VcsBase::Command *CloneWizard::createCommand(QString *checkoutDir) VcsBase::Command *CloneWizard::createCommand(Utils::FileName *checkoutDir)
{ {
const CloneWizardPage *cwp = 0; const CloneWizardPage *cwp = 0;
foreach (int pageId, pageIds()) { foreach (int pageId, pageIds()) {
...@@ -86,7 +86,7 @@ VcsBase::Command *CloneWizard::createCommand(QString *checkoutDir) ...@@ -86,7 +86,7 @@ VcsBase::Command *CloneWizard::createCommand(QString *checkoutDir)
return 0; return 0;
const BazaarSettings &settings = BazaarPlugin::instance()->settings(); const BazaarSettings &settings = BazaarPlugin::instance()->settings();
*checkoutDir = cwp->path() + QLatin1Char('/') + cwp->directory(); *checkoutDir = Utils::FileName::fromString(cwp->path() + QLatin1Char('/') + cwp->directory());
const CloneOptionsPanel *panel = cwp->cloneOptionsPanel(); const CloneOptionsPanel *panel = cwp->cloneOptionsPanel();
QStringList extraOptions; QStringList extraOptions;
......
...@@ -45,7 +45,7 @@ class CloneWizardFactory : public VcsBase::BaseCheckoutWizardFactory ...@@ -45,7 +45,7 @@ class CloneWizardFactory : public VcsBase::BaseCheckoutWizardFactory
public: public:
CloneWizardFactory(); CloneWizardFactory();
VcsBase::BaseCheckoutWizard *create(const QString &path, QWidget *parent = 0) const; VcsBase::BaseCheckoutWizard *create(const Utils::FileName &path, QWidget *parent = 0) const;
}; };
class CloneWizard : public VcsBase::BaseCheckoutWizard class CloneWizard : public VcsBase::BaseCheckoutWizard
...@@ -53,10 +53,10 @@ class CloneWizard : public VcsBase::BaseCheckoutWizard ...@@ -53,10 +53,10 @@ class CloneWizard : public VcsBase::BaseCheckoutWizard
Q_OBJECT Q_OBJECT
public: public:
CloneWizard(const QString &path, QWidget *parent = 0); CloneWizard(const Utils::FileName &path, QWidget *parent = 0);
protected: protected:
VcsBase::Command *createCommand(QString *checkoutDir); VcsBase::Command *createCommand(Utils::FileName *checkoutDir);
}; };
} // namespace Internal } // namespace Internal
......
...@@ -48,7 +48,7 @@ CheckoutWizardFactory::CheckoutWizardFactory() ...@@ -48,7 +48,7 @@ CheckoutWizardFactory::CheckoutWizardFactory()
setDisplayName(tr("CVS Checkout")); setDisplayName(tr("CVS Checkout"));
} }
VcsBase::BaseCheckoutWizard *CheckoutWizardFactory::create(const QString &path, QWidget *parent) const VcsBase::BaseCheckoutWizard *CheckoutWizardFactory::create(const Utils::FileName &path, QWidget *parent) const
{ {
return new CheckoutWizard(path, parent); return new CheckoutWizard(path, parent);
} }
...@@ -57,18 +57,18 @@ VcsBase::BaseCheckoutWizard *CheckoutWizardFactory::create(const QString &path, ...@@ -57,18 +57,18 @@ VcsBase::BaseCheckoutWizard *CheckoutWizardFactory::create(const QString &path,
// CheckoutWizard: // CheckoutWizard:
// -------------------------------------------------------------------- // --------------------------------------------------------------------
CheckoutWizard::CheckoutWizard(const QString &path, QWidget *parent) : CheckoutWizard::CheckoutWizard(const Utils::FileName &path, QWidget *parent) :
VcsBase::BaseCheckoutWizard(path, parent) VcsBase::BaseCheckoutWizard(path, parent)
{ {
const Core::IVersionControl *vc = CvsPlugin::instance()->versionControl(); const Core::IVersionControl *vc = CvsPlugin::instance()->versionControl();
if (!vc->isConfigured()) if (!vc->isConfigured())
addPage(new VcsBase::VcsConfigurationPage(vc)); addPage(new VcsBase::VcsConfigurationPage(vc));
CheckoutWizardPage *cwp = new CheckoutWizardPage; CheckoutWizardPage *cwp = new CheckoutWizardPage;
cwp->setPath(path); cwp->setPath(path.toString());
addPage(cwp); addPage(cwp);
} }
VcsBase::Command *CheckoutWizard::createCommand(QString *checkoutDir) VcsBase::Command *CheckoutWizard::createCommand(Utils::FileName *checkoutDir)
{ {
// Collect parameters for the checkout command. // Collect parameters for the checkout command.
// CVS does not allow for checking out into a different directory. // CVS does not allow for checking out into a different directory.
...@@ -86,7 +86,7 @@ VcsBase::Command *CheckoutWizard::createCommand(QString *checkoutDir) ...@@ -86,7 +86,7 @@ VcsBase::Command *CheckoutWizard::createCommand(QString *checkoutDir)
const QString repository = cwp->repository(); const QString repository = cwp->repository();
args << QLatin1String("checkout") << repository; args << QLatin1String("checkout") << repository;
const QString workingDirectory = cwp->path(); const QString workingDirectory = cwp->path();
*checkoutDir = workingDirectory + QLatin1Char('/') + repository; *checkoutDir = Utils::FileName::fromString(workingDirectory + QLatin1Char('/') + repository);
VcsBase::Command *command = new VcsBase::Command(binary, workingDirectory, VcsBase::Command *command = new VcsBase::Command(binary, workingDirectory,
QProcessEnvironment::systemEnvironment()); QProcessEnvironment::systemEnvironment());
......
...@@ -43,7 +43,7 @@ class CheckoutWizardFactory : public VcsBase::BaseCheckoutWizardFactory ...@@ -43,7 +43,7 @@ class CheckoutWizardFactory : public VcsBase::BaseCheckoutWizardFactory
public: public:
CheckoutWizardFactory(); CheckoutWizardFactory();
VcsBase::BaseCheckoutWizard *create(const QString &path, QWidget *parent = 0) const; VcsBase::BaseCheckoutWizard *create(const Utils::FileName &path, QWidget *parent = 0) const;
}; };
class CheckoutWizard : public VcsBase::BaseCheckoutWizard class CheckoutWizard : public VcsBase::BaseCheckoutWizard
...@@ -51,10 +51,10 @@ class CheckoutWizard : public VcsBase::BaseCheckoutWizard ...@@ -51,10 +51,10 @@ class CheckoutWizard : public VcsBase::BaseCheckoutWizard
Q_OBJECT Q_OBJECT
public: public:
CheckoutWizard(const QString &path, QWidget *parent = 0); CheckoutWizard(const Utils::FileName &path, QWidget *parent = 0);
protected: protected:
VcsBase::Command *createCommand(QString *checkoutDir); VcsBase::Command *createCommand(Utils::FileName *checkoutDir);
}; };
} // namespace Internal } // namespace Internal
......
...@@ -48,7 +48,7 @@ CloneWizardFactory::CloneWizardFactory() ...@@ -48,7 +48,7 @@ CloneWizardFactory::CloneWizardFactory()
setDisplayName(tr("Git Repository Clone")); setDisplayName(tr("Git Repository Clone"));
} }
VcsBase::BaseCheckoutWizard *CloneWizardFactory::create(const QString &path, QWidget *parent) const VcsBase::BaseCheckoutWizard *CloneWizardFactory::create(const Utils::FileName &path, QWidget *parent) const
{ {
return new CloneWizard(path, parent); return new CloneWizard(path, parent);
} }
...@@ -57,7 +57,7 @@ VcsBase::BaseCheckoutWizard *CloneWizardFactory::create(const QString &path, QWi ...@@ -57,7 +57,7 @@ VcsBase::BaseCheckoutWizard *CloneWizardFactory::create(const QString &path, QWi
// CloneWizard: // CloneWizard:
// -------------------------------------------------------------------- // --------------------------------------------------------------------
CloneWizard::CloneWizard(const QString &path, QWidget *parent) : CloneWizard::CloneWizard(const Utils::FileName &path, QWidget *parent) :
VcsBase::BaseCheckoutWizard(path, parent) VcsBase::BaseCheckoutWizard(path, parent)
{ {
setTitle(tr("Cloning")); setTitle(tr("Cloning"));
...@@ -67,11 +67,11 @@ CloneWizard::CloneWizard(const QString &path, QWidget *parent) : ...@@ -67,11 +67,11 @@ CloneWizard::CloneWizard(const QString &path, QWidget *parent) :
if (!vc->isConfigured()) if (!vc->isConfigured())
addPage(new VcsBase::VcsConfigurationPage(vc)); addPage(new VcsBase::VcsConfigurationPage(vc));
CloneWizardPage *cwp = new CloneWizardPage; CloneWizardPage *cwp = new CloneWizardPage;
cwp->setPath(path); cwp->setPath(path.toString());
addPage(cwp); addPage(cwp);
} }
VcsBase::Command *CloneWizard::createCommand(QString *checkoutDir) VcsBase::Command *CloneWizard::createCommand(Utils::FileName *checkoutDir)
{ {
// Collect parameters for the clone command. // Collect parameters for the clone command.
const CloneWizardPage *cwp = 0; const CloneWizardPage *cwp = 0;
......
...@@ -43,7 +43,7 @@ class CloneWizardFactory : public VcsBase::BaseCheckoutWizardFactory ...@@ -43,7 +43,7 @@ class CloneWizardFactory : public VcsBase::BaseCheckoutWizardFactory
public: public:
CloneWizardFactory(); CloneWizardFactory();
VcsBase::BaseCheckoutWizard *create(const QString &path, QWidget *parent = 0) const; VcsBase::BaseCheckoutWizard *create(const Utils::FileName &path, QWidget *parent = 0) const;
}; };
class CloneWizard : public VcsBase::BaseCheckoutWizard class CloneWizard : public VcsBase::BaseCheckoutWizard
...@@ -51,10 +51,10 @@ class CloneWizard : public VcsBase::BaseCheckoutWizard ...@@ -51,10 +51,10 @@ class CloneWizard : public VcsBase::BaseCheckoutWizard
Q_OBJECT Q_OBJECT
public: public:
CloneWizard(const QString &path, QWidget *parent = 0); CloneWizard(const Utils::FileName &path, QWidget *parent = 0);
protected: protected:
VcsBase::Command *createCommand(QString *checkoutDir); VcsBase::Command *createCommand(Utils::FileName *checkoutDir);
}; };
} // namespace Internal } // namespace Internal
......
...@@ -118,12 +118,12 @@ QString CloneWizardPage::directoryFromRepository(const QString &urlIn) const ...@@ -118,12 +118,12 @@ QString CloneWizardPage::directoryFromRepository(const QString &urlIn) const
return url; return url;
} }
VcsBase::Command *CloneWizardPage::createCheckoutJob(QString *checkoutPath) const VcsBase::Command *CloneWizardPage::createCheckoutJob(Utils::FileName *checkoutPath) const
{ {
const Internal::GitClient *client = Internal::GitPlugin::instance()->gitClient(); const Internal::GitClient *client = Internal::GitPlugin::instance()->gitClient();
const QString workingDirectory = path(); const QString workingDirectory = path();
const QString checkoutDir = directory(); const QString checkoutDir = directory();
*checkoutPath = workingDirectory + QLatin1Char('/') + checkoutDir; *checkoutPath = Utils::FileName::fromString(workingDirectory + QLatin1Char('/') + checkoutDir);
const QString checkoutBranch = branch(); const QString checkoutBranch = branch();
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <vcsbase/basecheckoutwizardpage.h> #include <vcsbase/basecheckoutwizardpage.h>
#include <QSharedPointer> #include <utils/fileutils.h>
namespace VcsBase { class Command; } namespace VcsBase { class Command; }
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
explicit CloneWizardPage(QWidget *parent = 0); explicit CloneWizardPage(QWidget *parent = 0);
~CloneWizardPage(); ~CloneWizardPage();
VcsBase::Command *createCheckoutJob(QString *checkoutPath) const; VcsBase::Command *createCheckoutJob(Utils::FileName *checkoutPath) const;
protected: protected:
QString directoryFromRepository(const QString &r) const; QString directoryFromRepository(const QString &r) const;
......
...@@ -77,7 +77,7 @@ GitoriousCloneWizardFactory::GitoriousCloneWizardFactory() ...@@ -77,7 +77,7 @@ GitoriousCloneWizardFactory::GitoriousCloneWizardFactory()
setDisplayName(tr("Gitorious Repository Clone")); setDisplayName(tr("Gitorious Repository Clone"));
} }
VcsBase::BaseCheckoutWizard *GitoriousCloneWizardFactory::create(const QString &path, QWidget *parent) const VcsBase::BaseCheckoutWizard *GitoriousCloneWizardFactory::create(const Utils::FileName &path, QWidget *parent) const
{ {
return new GitoriousCloneWizard(path, parent); return new GitoriousCloneWizard(path, parent);
} }
...@@ -86,7 +86,7 @@ VcsBase::BaseCheckoutWizard *GitoriousCloneWizardFactory::create(const QString & ...@@ -86,7 +86,7 @@ VcsBase::BaseCheckoutWizard *GitoriousCloneWizardFactory::create(const QString &
// GitoriousCloneWizard: // GitoriousCloneWizard:
// -------------------------------------------------------------------- // --------------------------------------------------------------------
GitoriousCloneWizard::GitoriousCloneWizard(const QString &path, QWidget *parent) : GitoriousCloneWizard::GitoriousCloneWizard(const Utils::FileName &path, QWidget *parent) :
VcsBase::BaseCheckoutWizard(path, parent) VcsBase::BaseCheckoutWizard(path, parent)
{ {
setTitle(tr("Cloning")); setTitle(tr("Cloning"));
...@@ -100,7 +100,7 @@ GitoriousCloneWizard::GitoriousCloneWizard(const QString &path, QWidget *parent) ...@@ -100,7 +100,7 @@ GitoriousCloneWizard::GitoriousCloneWizard(const QString &path, QWidget *parent)
GitoriousProjectWizardPage *projectPage = new GitoriousProjectWizardPage(hostPage); GitoriousProjectWizardPage *projectPage = new GitoriousProjectWizardPage(hostPage);
GitoriousRepositoryWizardPage *repoPage = new GitoriousRepositoryWizardPage(projectPage); GitoriousRepositoryWizardPage *repoPage = new GitoriousRepositoryWizardPage(projectPage);
GitoriousCloneWizardPage *clonePage = new GitoriousCloneWizardPage(repoPage); GitoriousCloneWizardPage *clonePage = new GitoriousCloneWizardPage(repoPage);
clonePage->setPath(path); clonePage->setPath(path.toString());
addPage(hostPage); addPage(hostPage);
addPage(projectPage); addPage(projectPage);
...@@ -108,7 +108,7 @@ GitoriousCloneWizard::GitoriousCloneWizard(const QString &path, QWidget *parent) ...@@ -108,7 +108,7 @@ GitoriousCloneWizard::GitoriousCloneWizard(const QString &path, QWidget *parent)
addPage(clonePage); addPage(clonePage);
} }
VcsBase::Command *GitoriousCloneWizard::createCommand(QString *checkoutDir) VcsBase::Command *GitoriousCloneWizard::createCommand(Utils::FileName *checkoutDir)
{ {
const Git::CloneWizardPage *cwp = 0; const Git::CloneWizardPage *cwp = 0;
foreach (int pageId, pageIds()) { foreach (int pageId, pageIds()) {
......
...@@ -45,7 +45,7 @@ class GitoriousCloneWizardFactory : public VcsBase::BaseCheckoutWizardFactory ...@@ -45,7 +45,7 @@ class GitoriousCloneWizardFactory : public VcsBase::BaseCheckoutWizardFactory
public: public:
GitoriousCloneWizardFactory(); GitoriousCloneWizardFactory();
VcsBase::BaseCheckoutWizard *create(const QString &path, QWidget *parent = 0) const; VcsBase::BaseCheckoutWizard *create(const Utils::FileName &path, QWidget *parent = 0) const;
}; };
class GitoriousCloneWizard : public VcsBase::BaseCheckoutWizard class GitoriousCloneWizard : public VcsBase::BaseCheckoutWizard
...@@ -53,10 +53,10 @@ class GitoriousCloneWizard : public VcsBase::BaseCheckoutWizard ...@@ -53,10 +53,10 @@ class GitoriousCloneWizard : public VcsBase::BaseCheckoutWizard
Q_OBJECT Q_OBJECT
public: public:
GitoriousCloneWizard(const QString &path, QWidget *parent = 0); GitoriousCloneWizard(const Utils::FileName &path, QWidget *parent = 0);
protected: protected:
VcsBase::Command *createCommand(QString *checkoutDir); VcsBase::Command *createCommand(Utils::FileName *checkoutDir);
}; };
......
...@@ -48,7 +48,7 @@ CloneWizardFactory::CloneWizardFactory() ...@@ -48,7 +48,7 @@ CloneWizardFactory::CloneWizardFactory()
setDisplayName(tr("Mercurial Clone")); setDisplayName(tr("Mercurial Clone"));
} }
BaseCheckoutWizard *CloneWizardFactory::create(const QString &path, QWidget *parent) const BaseCheckoutWizard *CloneWizardFactory::create(const Utils::FileName &path, QWidget *parent) const
{ {
return new CloneWizard(path, parent); return new CloneWizard(path, parent);
} }
...@@ -57,7 +57,7 @@ BaseCheckoutWizard *CloneWizardFactory::create(const QString &path, QWidget *par ...@@ -57,7 +57,7 @@ BaseCheckoutWizard *CloneWizardFactory::create(const QString &path, QWidget *par
// CloneWizard: // CloneWizard:
// -------------------------------------------------------------------- // --------------------------------------------------------------------
CloneWizard::CloneWizard(const QString &path, QWidget *parent) : CloneWizard::CloneWizard(const Utils::FileName &path, QWidget *parent) :
VcsBase::BaseCheckoutWizard(path, parent) VcsBase::BaseCheckoutWizard(path, parent)
{ {
setTitle(tr("Cloning")); setTitle(tr("Cloning"));
...@@ -67,11 +67,11 @@ CloneWizard::CloneWizard(const QString &path, QWidget *parent) : ...@@ -67,11 +67,11 @@ CloneWizard::CloneWizard(const QString &path, QWidget *parent) :
if (!vc->isConfigured()) if (!vc->isConfigured())
addPage(new VcsConfigurationPage(vc)); addPage(new VcsConfigurationPage(vc));
CloneWizardPage *page = new CloneWizardPage; CloneWizardPage *page = new CloneWizardPage;
page->setPath(path); page->setPath(path.toString());
addPage(page); addPage(page);
} }
Command *CloneWizard::createCommand(QString *checkoutDir) Command *CloneWizard::createCommand(Utils::FileName *checkoutDir)
{ {
const CloneWizardPage *cwp = 0; const CloneWizardPage *cwp = 0;
foreach (int pageId, pageIds()) { foreach (int pageId, pageIds()) {
...@@ -89,7 +89,7 @@ Command *CloneWizard::createCommand(QString *checkoutDir) ...@@ -89,7 +89,7 @@ Command *CloneWizard::createCommand(QString *checkoutDir)
QStringList args; QStringList args;
args << QLatin1String("clone") << cwp->repository() << directory; args << QLatin1String("clone") << cwp->repository() << directory;
*checkoutDir = path + QLatin1Char('/') + directory; *checkoutDir = Utils::FileName::fromString(path + QLatin1Char('/') + directory);
VcsBase::Command *command = new VcsBase::Command(settings.binaryPath(), path, VcsBase::Command *command = new VcsBase::Command(settings.binaryPath(), path,
QProcessEnvironment::systemEnvironment()); QProcessEnvironment::systemEnvironment());
command->addJob(args, -1); command->addJob(args, -1);
......
...@@ -45,7 +45,7 @@ class CloneWizardFactory : public VcsBase::BaseCheckoutWizardFactory ...@@ -45,7 +45,7 @@ class CloneWizardFactory : public VcsBase::BaseCheckoutWizardFactory
public: public:
CloneWizardFactory(); CloneWizardFactory();
VcsBase::BaseCheckoutWizard *create(const QString &path, QWidget *parent = 0) const; VcsBase::BaseCheckoutWizard *create(const Utils::FileName &path, QWidget *parent = 0) const;
private: private:
const QIcon m_icon; const QIcon m_icon;
...@@ -56,10 +56,10 @@ class CloneWizard : public VcsBase::BaseCheckoutWizard ...@@ -56,10 +56,10 @@ class CloneWizard : public VcsBase::BaseCheckoutWizard
Q_OBJECT Q_OBJECT
public: public:
CloneWizard(const QString &path, QWidget *parent = 0); CloneWizard(const Utils::FileName &path, QWidget *parent = 0);
protected: protected:
VcsBase::Command *createCommand(QString *checkoutDir); VcsBase::Command *createCommand(Utils::FileName *checkoutDir);
}; };
} //namespace Internal } //namespace Internal
......
...@@ -51,7 +51,7 @@ CheckoutWizardFactory::CheckoutWizardFactory() ...@@ -51,7 +51,7 @@ CheckoutWizardFactory::CheckoutWizardFactory()
setDisplayName(tr("Subversion Checkout")); setDisplayName(tr("Subversion Checkout"));
} }
VcsBase::BaseCheckoutWizard *CheckoutWizardFactory::create(const QString &path, QWidget *parent) const VcsBase::BaseCheckoutWizard *CheckoutWizardFactory::create(const Utils::FileName &path, QWidget *parent) const
{ {
return new CheckoutWizard(path, parent); return new CheckoutWizard(path, parent);
} }
...@@ -60,18 +60,18 @@ VcsBase::BaseCheckoutWizard *CheckoutWizardFactory::create(const QString &path, ...@@ -60,18 +60,18 @@ VcsBase::BaseCheckoutWizard *CheckoutWizardFactory::create(const QString &path,
// CheckoutWizard: // CheckoutWizard:
// -------------------------------------------------------------------- // --------------------------------------------------------------------
CheckoutWizard::CheckoutWizard(const QString &path, QWidget *parent) : CheckoutWizard::CheckoutWizard(const Utils::FileName &path, QWidget *parent) :
VcsBase::BaseCheckoutWizard(path, parent) VcsBase::BaseCheckoutWizard(path, parent)
{ {
const Core::IVersionControl *vc = SubversionPlugin::instance()->versionControl(); const Core::IVersionControl *vc = SubversionPlugin::instance()->versionControl();
if (!vc->isConfigured()) if (!vc->isConfigured())
addPage(new VcsBase::VcsConfigurationPage(vc)); addPage(new VcsBase::VcsConfigurationPage(vc));
CheckoutWizardPage *cwp = new CheckoutWizardPage; CheckoutWizardPage *cwp = new CheckoutWizardPage;
cwp->setPath(path); cwp->setPath(path.toString());
addPage(cwp); addPage(cwp);
} }
VcsBase::Command *CheckoutWizard::createCommand(QString *checkoutDir) VcsBase::Command *CheckoutWizard::createCommand(Utils::FileName *checkoutDir)
{ {
// Collect parameters for the checkout command. // Collect parameters for the checkout command.
const CheckoutWizardPage *cwp = 0; const CheckoutWizardPage *cwp = 0;
...@@ -88,7 +88,7 @@ VcsBase::Command *CheckoutWizard::createCommand(QString *checkoutDir) ...@@ -88,7 +88,7 @@ VcsBase::Command *CheckoutWizard::createCommand(QString *checkoutDir)
args << QLatin1String("checkout") << cwp->repository() << directory; args << QLatin1String("checkout") << cwp->repository() << directory;
const QString workingDirectory = cwp->path(); const QString workingDirectory = cwp->path();
*checkoutDir = workingDirectory + QLatin1Char('/') + directory; *checkoutDir = Utils::FileName::fromString(workingDirectory + QLatin1Char('/') + directory);
if (settings.hasAuthentication()) { if (settings.hasAuthentication()) {
const QString user = settings.stringValue(SubversionSettings::userKey); const QString user = settings.stringValue(SubversionSettings::userKey);
......
...@@ -43,7 +43,7 @@ class CheckoutWizardFactory : public VcsBase::BaseCheckoutWizardFactory ...@@ -43,7 +43,7 @@ class CheckoutWizardFactory : public VcsBase::BaseCheckoutWizardFactory
public: public:
CheckoutWizardFactory(); CheckoutWizardFactory();
VcsBase::BaseCheckoutWizard *create(const QString &path, QWidget *parent = 0) const; VcsBase::BaseCheckoutWizard *create(const Utils::FileName &path, QWidget *parent = 0) const;
}; };
class CheckoutWizard : public VcsBase::BaseCheckoutWizard class CheckoutWizard : public VcsBase::BaseCheckoutWizard
...@@ -51,10 +51,10 @@ class CheckoutWizard : public VcsBase::BaseCheckoutWizard ...@@ -51,10 +51,10 @@ class CheckoutWizard : public VcsBase::BaseCheckoutWizard
Q_OBJECT Q_OBJECT
public: public:
CheckoutWizard(const QString &path, QWidget *parent = 0); CheckoutWizard(const Utils::FileName &path, QWidget *parent = 0);
protected: protected:
VcsBase::Command *createCommand(QString *checkoutDir); VcsBase::Command *createCommand(Utils::FileName *checkoutDir);
}; };
} // namespace Internal } // namespace Internal
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
namespace VcsBase { namespace VcsBase {
BaseCheckoutWizard::BaseCheckoutWizard(const QString &path, QWidget *parent) : BaseCheckoutWizard::BaseCheckoutWizard(const Utils::FileName &path, QWidget *parent) :
Utils::Wizard(parent), Utils::Wizard(parent),
m_progressPage(new Internal::CheckoutProgressWizardPage), m_progressPage(new Internal::CheckoutProgressWizardPage),
m_progressPageId(-1) m_progressPageId(-1)
...@@ -86,13 +86,13 @@ void BaseCheckoutWizard::slotTerminated(bool success) ...@@ -86,13 +86,13 @@ void BaseCheckoutWizard::slotTerminated(bool success)
button(QWizard::BackButton)->setEnabled(true); button(QWizard::BackButton)->setEnabled(true);
} }
QString BaseCheckoutWizard::run() Utils::FileName BaseCheckoutWizard::run()
{ {