forked from qt-creator/qt-creator
CMake: use FilePaths to generate relative source entries
Change-Id: I5df67517e269d650166f72a625e5835e780fca9d Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -81,9 +81,8 @@ static void copySourcePathsToClipboard(const FilePaths &srcPaths, const ProjectN
|
|||||||
{
|
{
|
||||||
QClipboard *clip = QGuiApplication::clipboard();
|
QClipboard *clip = QGuiApplication::clipboard();
|
||||||
|
|
||||||
QDir projDir{node->filePath().toFileInfo().absoluteFilePath()};
|
QString data = Utils::transform(srcPaths, [projDir = node->filePath()](const FilePath &path) {
|
||||||
QString data = Utils::transform(srcPaths, [projDir](const FilePath &path) {
|
return path.relativePath(projDir).cleanPath().toString();
|
||||||
return QDir::cleanPath(projDir.relativeFilePath(path.toString()));
|
|
||||||
}).join(" ");
|
}).join(" ");
|
||||||
clip->setText(data);
|
clip->setText(data);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user