QStorageInfo/Linux: move from MountInfo's contents
Copying QStrings and QByteArrays is reasonably cheap, but moving is cheaper. Pick-to: 6.6 Change-Id: I9d43e5b91eb142d6945cfffd1787498ead687da2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
This commit is contained in:
parent
914b3bc985
commit
da95ad91b3
@ -149,10 +149,10 @@ void QStorageInfoPrivate::initRootPath()
|
||||
}
|
||||
}
|
||||
if (bestInfo) {
|
||||
rootPath = bestInfo->mountPoint;
|
||||
device = bestInfo->device;
|
||||
fileSystemType = bestInfo->fsType;
|
||||
subvolume = bestInfo->fsRoot;
|
||||
rootPath = std::move(bestInfo->mountPoint);
|
||||
device = std::move(bestInfo->device);
|
||||
fileSystemType = std::move(bestInfo->fsType);
|
||||
subvolume = std::move(bestInfo->fsRoot);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user