summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/projectmodels.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-05-28 13:49:26 +0200
committerhjk <hjk@qt.io>2019-05-28 12:23:26 +0000
commit473a741c9fcf09febba312464fab8385e2351181 (patch)
tree2d328a090993cb5c5fd34b43e9468bcbf7e4d4d0 /src/plugins/projectexplorer/projectmodels.cpp
parent4704f49fbb1201ebf10ab9dbaed0275ff25faba8 (diff)
downloadqt-creator-473a741c9fcf09febba312464fab8385e2351181.tar.gz
Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/projectmodels.cpp')
-rw-r--r--src/plugins/projectexplorer/projectmodels.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/projectexplorer/projectmodels.cpp b/src/plugins/projectexplorer/projectmodels.cpp
index 31f986d864..cfacd27ab6 100644
--- a/src/plugins/projectexplorer/projectmodels.cpp
+++ b/src/plugins/projectexplorer/projectmodels.cpp
@@ -219,8 +219,8 @@ bool FlatModel::setData(const QModelIndex &index, const QVariant &value, int rol
Node *node = nodeForIndex(index);
QTC_ASSERT(node, return false);
- const Utils::FileName orgFilePath = node->filePath();
- const Utils::FileName newFilePath = orgFilePath.parentDir().pathAppended(value.toString());
+ const Utils::FilePath orgFilePath = node->filePath();
+ const Utils::FilePath newFilePath = orgFilePath.parentDir().pathAppended(value.toString());
ProjectExplorerPlugin::renameFile(node, newFilePath.toString());
emit renamed(orgFilePath, newFilePath);
@@ -453,7 +453,7 @@ class DropFileDialog : public QDialog
{
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::FlatModel)
public:
- DropFileDialog(const FileName &defaultTargetDir)
+ DropFileDialog(const FilePath &defaultTargetDir)
: m_buttonBox(new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel)),
m_buttonGroup(new QButtonGroup(this))
{
@@ -516,9 +516,9 @@ public:
}
DropAction dropAction() const { return static_cast<DropAction>(m_buttonGroup->checkedId()); }
- FileName targetDir() const
+ FilePath targetDir() const
{
- return m_targetDirChooser ? m_targetDirChooser->fileName() : FileName();
+ return m_targetDirChooser ? m_targetDirChooser->fileName() : FilePath();
}
private:
@@ -576,15 +576,15 @@ bool FlatModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int r
// Node weirdness: Sometimes the "file path" is a directory, sometimes it's a file...
const auto dirForProjectNode = [](const ProjectNode *pNode) {
- const FileName dir = pNode->filePath();
+ const FilePath dir = pNode->filePath();
if (dir.toFileInfo().isDir())
return dir;
- return FileName::fromString(dir.toFileInfo().path());
+ return FilePath::fromString(dir.toFileInfo().path());
};
- FileName targetDir = dirForProjectNode(targetProjectNode);
+ FilePath targetDir = dirForProjectNode(targetProjectNode);
// Ask the user what to do now: Copy or add? With or without file transfer?
- DropFileDialog dlg(targetDir == dirForProjectNode(sourceProjectNode) ? FileName() : targetDir);
+ DropFileDialog dlg(targetDir == dirForProjectNode(sourceProjectNode) ? FilePath() : targetDir);
if (dlg.exec() != QDialog::Accepted)
return true;
if (!dlg.targetDir().isEmpty())