aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmakeprojectmanager/qmakenodes.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2025-01-09 11:58:40 +0100
committerhjk <[email protected]>2025-01-10 13:05:29 +0000
commit2d9d6aa315976dc8937381e453f57263950d8841 (patch)
tree7ccb860763e95ad24272b158ead690afb79e9c3b /src/plugins/qmakeprojectmanager/qmakenodes.cpp
parent0986822d44c80ee1fc8fef0289a05ccc2d4d3668 (diff)
Utils: Rename FilePath::toString() into toUrlishString()
toString() is almost always the wrong conversion, but unfortunately too easy to find and often even working at least for local setup. This here raises the bar as the non-availability of the "obvious" toString() hopefully helps people to think about the semantics of the needed conversion and choose the right toXXX() function. The chosen new name is intentional ugly to reduce the likelihood that this (still almost always wrong) function is used out of convenience. Change-Id: I57f1618dd95ef2629d7d978688d130275e096c0f Reviewed-by: Eike Ziller <[email protected]>
Diffstat (limited to 'src/plugins/qmakeprojectmanager/qmakenodes.cpp')
-rw-r--r--src/plugins/qmakeprojectmanager/qmakenodes.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.cpp b/src/plugins/qmakeprojectmanager/qmakenodes.cpp
index 3e696699b4c..8003a171df7 100644
--- a/src/plugins/qmakeprojectmanager/qmakenodes.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakenodes.cpp
@@ -116,12 +116,12 @@ bool QmakeBuildSystem::supportsAction(Node *context, ProjectAction action, const
if (folder) {
FilePaths list;
folder->forEachFolderNode([&](FolderNode *f) { list << f->filePath(); });
- if (n->deploysFolder(FileUtils::commonPath(list).toString()))
+ if (n->deploysFolder(FileUtils::commonPath(list).toUrlishString()))
addExistingFiles = false;
}
}
- addExistingFiles = addExistingFiles && !n->deploysFolder(node->filePath().toString());
+ addExistingFiles = addExistingFiles && !n->deploysFolder(node->filePath().toUrlishString());
if (action == AddExistingFile || action == AddExistingDirectory)
return addExistingFiles;
@@ -214,7 +214,7 @@ RemovedFilesFromProject QmakeBuildSystem::removeFiles(Node *context, const FileP
FilePaths wildcardFiles;
FilePaths nonWildcardFiles;
for (const FilePath &file : filePaths) {
- if (pri->proFile()->isFileFromWildcard(file.toString()))
+ if (pri->proFile()->isFileFromWildcard(file.toUrlishString()))
wildcardFiles << file;
else
nonWildcardFiles << file;
@@ -318,7 +318,7 @@ bool QmakeProFileNode::showInSimpleTree() const
QString QmakeProFileNode::buildKey() const
{
- return filePath().toString();
+ return filePath().toUrlishString();
}
bool QmakeProFileNode::parseInProgress() const
@@ -365,11 +365,11 @@ QVariant QmakeProFileNode::data(Id role) const
return singleVariableValue(Variable::AndroidDeploySettingsFile);
if (role == Android::Constants::AndroidSoLibPath) {
TargetInformation info = targetInformation();
- QStringList res = {info.buildDir.toString()};
+ QStringList res = {info.buildDir.toUrlishString()};
FilePath destDir = info.destDir;
if (!destDir.isEmpty()) {
destDir = info.buildDir.resolvePath(destDir.path());
- res.append(destDir.toString());
+ res.append(destDir.toUrlishString());
}
res.removeDuplicates();
return res;
@@ -389,7 +389,7 @@ QVariant QmakeProFileNode::data(Id role) const
if (role == Ios::Constants::IosBuildDir) {
const TargetInformation info = targetInformation();
if (info.valid)
- return info.buildDir.toString();
+ return info.buildDir.toUrlishString();
}
if (role == Ios::Constants::IosCmakeGenerator) {