Make code Qt 6 compatible / raises minimum Qt 5 version to 5.14

In addition to replacing Qt5 with Qt6 in CMakeLists.txt
two small changes to the code are needed to make things build
on Qt 6 (which in turn is needed for Apple M1/M2 support).

The cost of this change is that when building on Qt 5, at least
version 5.14 is needed.
Certain older but still used Linux distributions such as
Ubuntu 10.04 LTS still use 5.12, so revert this commit if you
are building on those...
This commit is contained in:
Floris Bos 2023-03-19 21:54:00 +01:00
parent 08599d082c
commit c8a05b995f
3 changed files with 4 additions and 7 deletions

View file

@ -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"