forked from qt-creator/qt-creator
Utils: Use .path() instead of .toString() in some local cases
Same effect, but "better" conceptionally. Change-Id: Ic33bdc097b38176e81413736b2eb44d1fb7d0a3f Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -458,7 +458,7 @@ bool DesktopDeviceFileAccess::removeRecursively(const FilePath &filePath, QStrin
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!QFile::remove(filePath.toString())) {
|
if (!QFile::remove(filePath.path())) {
|
||||||
if (error) {
|
if (error) {
|
||||||
*error = QCoreApplication::translate("Utils::FileUtils", "Failed to remove file \"%1\".")
|
*error = QCoreApplication::translate("Utils::FileUtils", "Failed to remove file \"%1\".")
|
||||||
.arg(filePath.toUserOutput());
|
.arg(filePath.toUserOutput());
|
||||||
@@ -652,7 +652,7 @@ QByteArray DesktopDeviceFileAccess::fileId(const FilePath &filePath) const
|
|||||||
return result;
|
return result;
|
||||||
|
|
||||||
QT_STATBUF statResult;
|
QT_STATBUF statResult;
|
||||||
if (QT_STAT(filePath.toString().toLocal8Bit().constData(), &statResult))
|
if (QT_STAT(filePath.path().toLocal8Bit().constData(), &statResult))
|
||||||
return result;
|
return result;
|
||||||
result = QByteArray::number(quint64(statResult.st_dev), 16);
|
result = QByteArray::number(quint64(statResult.st_dev), 16);
|
||||||
result += ':';
|
result += ':';
|
||||||
|
|||||||
Reference in New Issue
Block a user