diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 63c250373..762d6c2c5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -100,7 +100,7 @@ set(SOURCES "main.cpp" "imagewriter.cpp" "networkaccessmanagerfactory.cpp" "devicewrapper.cpp" "devicewrapperblockcacheentry.cpp" "devicewrapperpartition.cpp" "devicewrapperfatpartition.cpp" "driveformatthread.cpp" "localfileextractthread.cpp" "powersaveblocker.cpp" "downloadstatstelemetry.cpp" "qml.qrc" "dependencies/sha256crypt/sha256crypt.c" "cli.cpp") -find_package(Qt5 COMPONENTS Core Quick LinguistTools Svg OPTIONAL_COMPONENTS Widgets) +find_package(Qt5 5.14 COMPONENTS Core Quick LinguistTools Svg OPTIONAL_COMPONENTS Widgets) if (Qt5Widgets_FOUND) set(EXTRALIBS ${EXTRALIBS} Qt5::Widgets) endif() diff --git a/src/OptionsPopup.qml b/src/OptionsPopup.qml index da0272d86..a1f855e61 100644 --- a/src/OptionsPopup.qml +++ b/src/OptionsPopup.qml @@ -3,7 +3,7 @@ * Copyright (C) 2021 Raspberry Pi Ltd */ -import QtQuick 2.9 +import QtQuick 2.15 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.0 import QtQuick.Controls.Material 2.2 @@ -128,9 +128,7 @@ Popup { id: fieldHostname enabled: chkHostname.checked text: "raspberrypi" - /* FIXME: use RegularExpressionValidator instead when moving to newer Qt version. - It is not available in 5.12 that is still being used by Ubuntu 20 LTS though */ - validator: RegExpValidator { regExp: /[0-9A-Za-z][0-9A-Za-z-]{0,62}/ } + validator: RegularExpressionValidator { regularExpression: /[0-9A-Za-z][0-9A-Za-z-]{0,62}/ } } Text { text : ".local" diff --git a/src/devicewrapperfatpartition.cpp b/src/devicewrapperfatpartition.cpp index a05d2c450..5b566c421 100644 --- a/src/devicewrapperfatpartition.cpp +++ b/src/devicewrapperfatpartition.cpp @@ -1,6 +1,5 @@ #include "devicewrapperfatpartition.h" #include "devicewrapperstructs.h" -#include "qdebug.h" /* * SPDX-License-Identifier: Apache-2.0 @@ -314,7 +313,7 @@ void DeviceWrapperFatPartition::writeFile(const QString &filename, const QByteAr for (uint32_t cluster : qAsConst(clusterList)) { seekCluster(cluster); - write(contents.data()+pos, qMin(_bytesPerCluster, contents.length()-pos)); + write(contents.data()+pos, qMin((qsizetype)_bytesPerCluster, (qsizetype)(contents.length()-pos))); pos += _bytesPerCluster; if (pos >= contents.length())