forked from qt-creator/qt-creator
Use qint64 instead of quint64 for bytesAvailable
Amends 79ce29b5a1
Change-Id: I922358f793fc40858495ecf5d3e62e75b1f44717
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -66,16 +66,16 @@ void RemoteLinuxCheckForFreeDiskSpaceService::deployAndFinish()
|
|||||||
auto cleanup = qScopeGuard([this] { setFinished(); });
|
auto cleanup = qScopeGuard([this] { setFinished(); });
|
||||||
const Utils::FilePath path
|
const Utils::FilePath path
|
||||||
= deviceConfiguration()->mapToGlobalPath(Utils::FilePath::fromString(d->pathToCheck));
|
= deviceConfiguration()->mapToGlobalPath(Utils::FilePath::fromString(d->pathToCheck));
|
||||||
const quint64 freeSpace = path.bytesAvailable();
|
const qint64 freeSpace = path.bytesAvailable();
|
||||||
if (freeSpace < 0) {
|
if (freeSpace < 0) {
|
||||||
emit errorMessage(tr("Can't get the info about the free disk space for \"%1\"")
|
emit errorMessage(tr("Can't get the info about the free disk space for \"%1\"")
|
||||||
.arg(path.toUserOutput()));
|
.arg(path.toUserOutput()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const quint64 mb = 1024 * 1024;
|
const qint64 mb = 1024 * 1024;
|
||||||
const quint64 freeSpaceMB = freeSpace / mb;
|
const qint64 freeSpaceMB = freeSpace / mb;
|
||||||
const quint64 requiredSpaceMB = d->requiredSpaceInBytes / mb;
|
const qint64 requiredSpaceMB = d->requiredSpaceInBytes / mb;
|
||||||
|
|
||||||
if (freeSpaceMB < requiredSpaceMB) {
|
if (freeSpaceMB < requiredSpaceMB) {
|
||||||
emit errorMessage(tr("The remote file system has only %n megabytes of free space, "
|
emit errorMessage(tr("The remote file system has only %n megabytes of free space, "
|
||||||
|
|||||||
Reference in New Issue
Block a user