forked from qt-creator/qt-creator
Utils: Remove rarely used FilePath constructor
Not much benefit interface-wise. Change-Id: I0e605ec235e8072efcbf7e777cf7e8f8ee5e0799 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -760,13 +760,6 @@ FilePath FilePath::fromStringWithExtension(const QString &filepath, const QStrin
|
||||
return FilePath::fromString(rc);
|
||||
}
|
||||
|
||||
/// Constructs a FileName from \a fileName
|
||||
/// \a fileName is not checked for validity.
|
||||
FilePath FilePath::fromLatin1(const QByteArray &filename)
|
||||
{
|
||||
return FilePath::fromString(QString::fromLatin1(filename));
|
||||
}
|
||||
|
||||
/// Constructs a FileName from \a fileName
|
||||
/// \a fileName is only passed through QDir::cleanPath
|
||||
FilePath FilePath::fromUserInput(const QString &filename)
|
||||
|
@@ -69,7 +69,6 @@ public:
|
||||
static FilePath fromString(const QString &filepath);
|
||||
static FilePath fromFileInfo(const QFileInfo &info);
|
||||
static FilePath fromStringWithExtension(const QString &filepath, const QString &defaultExtension);
|
||||
static FilePath fromLatin1(const QByteArray &filepath);
|
||||
static FilePath fromUserInput(const QString &filepath);
|
||||
static FilePath fromUtf8(const char *filepath, int filepathSize = -1);
|
||||
static FilePath fromVariant(const QVariant &variant);
|
||||
|
@@ -53,7 +53,7 @@ public:
|
||||
auto root = std::make_unique<ProjectExplorer::ProjectNode>(file);
|
||||
root->addNode(std::move(fileNode));
|
||||
fileNode = std::make_unique<ProjectExplorer::FileNode>(
|
||||
Utils::FilePath::fromLatin1(
|
||||
Utils::FilePath::fromString(
|
||||
":/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp"),
|
||||
ProjectExplorer::FileType::Source);
|
||||
root->addNode(std::move(fileNode));
|
||||
@@ -220,7 +220,7 @@ void QmlProfilerDetailsRewriterTest::seedRewriter()
|
||||
|
||||
auto kit = std::make_unique<ProjectExplorer::Kit>();
|
||||
ProjectExplorer::SysRootKitAspect::setSysRoot(
|
||||
kit.get(), Utils::FilePath::fromLatin1("/nowhere"));
|
||||
kit.get(), Utils::FilePath::fromString("/nowhere"));
|
||||
|
||||
DummyProject *project = new DummyProject(Utils::FilePath::fromString(filename));
|
||||
ProjectExplorer::SessionManager::addProject(project);
|
||||
|
Reference in New Issue
Block a user