From f0add5adc44acc4ad0be3f8c24d5c1f454bff365 Mon Sep 17 00:00:00 2001 From: Emeric Date: Sat, 27 Jan 2024 16:03:59 +0100 Subject: [PATCH] Various cleanups --- assets/assets.qrc | 1 + assets/ios/Info.plist | 2 ++ src/device.h | 2 ++ src/thirdparty/MobileSharing/CMakeLists.txt | 8 +++++--- src/thirdparty/MobileSharing/MobileSharing.pri | 4 ++-- src/thirdparty/MobileUI/MobileUI.pri | 2 +- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/assets/assets.qrc b/assets/assets.qrc index 71d7e9013..4499d0638 100644 --- a/assets/assets.qrc +++ b/assets/assets.qrc @@ -122,6 +122,7 @@ icons_material/duotone-format_size-24px.svg icons_material/duotone-date_range-24px.svg icons_material/duotone-date_clear-24px.svg + icons_material/duotone-info-24px.svg icons_material/duotone-insert_chart-24px.svg icons_material/duotone-launch-24px.svg icons_material/duotone-local_drink-24px.svg diff --git a/assets/ios/Info.plist b/assets/ios/Info.plist index 18c8502c6..c6441eb17 100644 --- a/assets/ios/Info.plist +++ b/assets/ios/Info.plist @@ -32,6 +32,8 @@ WatchFlower connects to Bluetooth Low Energy sensors. NSBluetoothPeripheralUsageDescription WatchFlower connects to Bluetooth Low Energy sensors. + ITSAppUsesNonExemptEncryption + UILaunchStoryboardName AppLaunchScreen UISupportedInterfaceOrientations diff --git a/src/device.h b/src/device.h index e455675c2..b76046bb6 100644 --- a/src/device.h +++ b/src/device.h @@ -67,6 +67,7 @@ class Device: public QObject Q_PROPERTY(bool isLight READ isLight NOTIFY sensorUpdated) Q_PROPERTY(bool isBeacon READ isBeacon NOTIFY sensorUpdated) Q_PROPERTY(bool isRemote READ isRemote NOTIFY sensorUpdated) + Q_PROPERTY(bool isPBP READ isPBP NOTIFY sensorUpdated) Q_PROPERTY(bool isPGP READ isPGP NOTIFY sensorUpdated) Q_PROPERTY(bool hasBluetoothConnection READ hasBluetoothConnection CONSTANT) @@ -280,6 +281,7 @@ class Device: public QObject bool isLight() const { return (m_deviceType == DeviceUtils::DEVICE_LIGHT); } bool isBeacon() const { return (m_deviceType == DeviceUtils::DEVICE_BEACON); } bool isRemote() const { return (m_deviceType == DeviceUtils::DEVICE_REMOTE); } + bool isPBP() const { return (m_deviceType == DeviceUtils::DEVICE_PBP); } bool isPGP() const { return (m_deviceType == DeviceUtils::DEVICE_PGP); } virtual bool hasRealTime() const { return (m_deviceCapabilities & DeviceUtils::DEVICE_REALTIME); } diff --git a/src/thirdparty/MobileSharing/CMakeLists.txt b/src/thirdparty/MobileSharing/CMakeLists.txt index b40431844..498fb2497 100644 --- a/src/thirdparty/MobileSharing/CMakeLists.txt +++ b/src/thirdparty/MobileSharing/CMakeLists.txt @@ -1,9 +1,11 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.20) project(MobileSharing LANGUAGES CXX) set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) ################################################################################ @@ -23,7 +25,7 @@ set(CORE_SOURCES SharingUtils.cpp SharingUtils.h) # OS specific sources & dependencies -if(ANDROID) +if (ANDROID) if(QT_DEFAULT_MAJOR_VERSION EQUAL 6) set(PLATFORM_SOURCES SharingUtils_android_qt6.cpp @@ -39,7 +41,7 @@ if(ANDROID) set(PLATFORM_LIBRARIES Qt::AndroidExtras) endif() -elseif(IOS) +elseif (IOS) find_package(Qt${QT_DEFAULT_MAJOR_VERSION} REQUIRED COMPONENTS Quick) set(PLATFORM_LIBRARIES Qt::Quick) set(PLATFORM_SOURCES diff --git a/src/thirdparty/MobileSharing/MobileSharing.pri b/src/thirdparty/MobileSharing/MobileSharing.pri index e62ed5324..3466909a3 100644 --- a/src/thirdparty/MobileSharing/MobileSharing.pri +++ b/src/thirdparty/MobileSharing/MobileSharing.pri @@ -43,8 +43,8 @@ android { ios { LIBS += -framework UIKit - OBJECTIVE_SOURCES += $${PWD}/SharingUtils_ios.mm \ - $${PWD}/docviewcontroller_ios.mm + SOURCES += $${PWD}/SharingUtils_ios.mm \ + $${PWD}/docviewcontroller_ios.mm HEADERS += $${PWD}/SharingUtils_ios.h \ $${PWD}/docviewcontroller_ios.h diff --git a/src/thirdparty/MobileUI/MobileUI.pri b/src/thirdparty/MobileUI/MobileUI.pri index af926e477..20823307e 100644 --- a/src/thirdparty/MobileUI/MobileUI.pri +++ b/src/thirdparty/MobileUI/MobileUI.pri @@ -16,7 +16,7 @@ android { } } else: ios { LIBS += -framework UIKit - OBJECTIVE_SOURCES += $${PWD}/MobileUI_ios.mm + SOURCES += $${PWD}/MobileUI_ios.mm } else { SOURCES += $${PWD}/MobileUI_dummy.cpp }