QStorageInfo/Linux: remove const to enable moving from MountInfo

Amends da95ad91b3. Caught by CodeChecker:

std::move of the const expression has no effect; remove std::move()

I'll instead remove the const.

Pick-to: 6.6
Change-Id: I8f3ce163ccc5408cac39fffd178ccec9fcc38e9c
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
bb10
Thiago Macieira 2023-10-10 10:22:06 -07:00
parent 25cc336700
commit a5a288feb3
1 changed files with 2 additions and 2 deletions

View File

@ -139,8 +139,8 @@ void QStorageInfoPrivate::initRootPath()
const QString oldRootPath = rootPath;
rootPath.clear();
const MountInfo *bestInfo = nullptr;
for (const MountInfo &info : infos) {
MountInfo *bestInfo = nullptr;
for (MountInfo &info : infos) {
// we try to find most suitable entry
qsizetype mpSize = info.mountPoint.size();
if (maxLength < mpSize && isParentOf(info.mountPoint, oldRootPath)) {