Utils: Introduce FilePathAspect::setDefaultPathValue(FilePath)

... as a convenience function for .setDefaultValue(filePath.toUserOutput());

The case that someone already has FilePaths should not look (much)
uglier on the user side than the QString "raw" case.

Direct overloading setDefaultValue(FilePath) causes resolution
conflicts, which are solvable, but I'd rather keep it explicit now.

Change-Id: I03d71e4f99005a1d1f76ebf23080bebe46a9351d
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
hjk
2024-01-24 12:31:10 +01:00
parent 359ab928b1
commit ead7afde3d
5 changed files with 11 additions and 5 deletions

View File

@@ -1442,6 +1442,11 @@ void FilePathAspect::setDefaultValue(const QString &filePath)
TypedAspect::setDefaultValue(filePath);
}
void FilePathAspect::setDefaultPathValue(const FilePath &filePath)
{
TypedAspect::setDefaultValue(filePath.toUserOutput());
}
/*!
Adds a check box with a \a checkerLabel according to \a checkBoxPlacement
to the line edit.