From f669df1dfeca8263216a852bedfc450e961ab9db Mon Sep 17 00:00:00 2001 From: consti10 Date: Tue, 27 Feb 2024 17:32:41 +0100 Subject: [PATCH] QT 6 --- app/telemetry/tutil/geodesi_helper.cpp | 4 ++-- qml/ui/configpopup/connect/PaneConnectionMode.qml | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/app/telemetry/tutil/geodesi_helper.cpp b/app/telemetry/tutil/geodesi_helper.cpp index 668b2edc5..594d3c054 100644 --- a/app/telemetry/tutil/geodesi_helper.cpp +++ b/app/telemetry/tutil/geodesi_helper.cpp @@ -1,8 +1,8 @@ #include "geodesi_helper.h" extern "C" { -#include "lib/geographiclib-c-2.0/src/geodesic.h" -//#include "geodesic.h" +//#include "lib/geographiclib-c-2.0/src/geodesic.h" +#include "geodesic.h" } double distance_between(double lat1, double lon1, double lat2, double lon2){ diff --git a/qml/ui/configpopup/connect/PaneConnectionMode.qml b/qml/ui/configpopup/connect/PaneConnectionMode.qml index ec0de98a9..312e4d16a 100644 --- a/qml/ui/configpopup/connect/PaneConnectionMode.qml +++ b/qml/ui/configpopup/connect/PaneConnectionMode.qml @@ -236,10 +236,6 @@ Rectangle{ TextField { Layout.alignment: Qt.AlignCenter id: textFieldip - // TODO QT 6 - //validator: RegExpValidator { - // regExp: /^((?:[0-1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\.){0,3}(?:[0-1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])$/ - //} validator: RegularExpressionValidator{ regularExpression: /^((?:[0-1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\.){0,3}(?:[0-1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])$/ } @@ -250,10 +246,11 @@ Rectangle{ Layout.alignment: Qt.AlignCenter text: "SAVE" onClicked: { - if(!_mavlinkTelemetry.change_manual_tcp_ip(textFieldip.text)){ + const text=textFieldip.text; + if(!_mavlinkTelemetry.change_manual_tcp_ip(text)){ _qopenhd.show_toast("Please enter a valid ip"); }else{ - settings.qopenhd_mavlink_connection_manual_tcp_ip=textFieldip.text + settings.qopenhd_mavlink_connection_manual_tcp_ip=text; } } }