It is likely that the fileUrls property of FileDialog is actually of type QStringList, so passing the value to the C++ function might not involve any conversions.
In which case passing by const reference would not create a copy. Even passing by value would be cheap since QList is implicitly shared (reference counted) so copying is a relatively cheap operation.
Do you have any benchmark that shows the operation to be slow?
Cheers,
_





Reply With Quote

Bookmarks