From 499c2db98c8b03872794c687cbb55bddd3efc878 Mon Sep 17 00:00:00 2001 From: NotEvan17 Date: Thu, 25 Sep 2025 21:41:47 -0400 Subject: [PATCH 1/5] Fixed Windows Compatibility Issues --- NERODevelopment/CMakeLists.txt | 84 ++++++++++++++++++++++++++-------- NERODevelopment/src/main.cpp | 8 +++- 2 files changed, 71 insertions(+), 21 deletions(-) diff --git a/NERODevelopment/CMakeLists.txt b/NERODevelopment/CMakeLists.txt index 2d22d70..ed6ee96 100644 --- a/NERODevelopment/CMakeLists.txt +++ b/NERODevelopment/CMakeLists.txt @@ -5,38 +5,65 @@ option(BUILD_QDS_COMPONENTS "Build design studio components" ON) project(NEROApp LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) +# Find Qt6 first before version checks +find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick Network Mqtt Protobuf) + +# Windows-specific AutoMoc fixes +if(WIN32) + # Force response files for long command lines on Windows + set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS ON) + set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES ON) + set(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "@") + + # Set AutoMoc to use response files much earlier on Windows + set(CMAKE_AUTOGEN_COMMAND_LINE_LENGTH_MAX 2000) + # Reduce AutoMoc parallel processing on Windows to avoid command line issues + set(CMAKE_AUTOGEN_PARALLEL 1) +endif() + +# Enable AutoMoc after Windows-specific settings +set(CMAKE_AUTOMOC ON) -if (Qt6_VERSION VERSION_GREATER_EQUAL 6.5) +# Fix Qt version check - use Qt6Core_VERSION instead of Qt6_VERSION +if (Qt6Core_VERSION VERSION_GREATER_EQUAL "6.5") qt_standard_project_setup() endif() +# Consolidate all sources in one place set(PROJECT_SOURCES + # Headers - Constants src/constants/fault_statuses.h + # Headers - Controllers src/controllers/chargingcontroller.h src/controllers/homecontroller.h src/controllers/offviewcontroller.h src/controllers/efficiencycontroller.h src/controllers/headercontroller.h - src/controllers/offviewcontroller.h src/controllers/buttoncontroller.h src/controllers/navigationcontroller.h src/controllers/flappybirdcontroller.h + src/controllers/speedcontroller.h + src/controllers/snakecontroller.h + src/controllers/tankcontroller.h + # Headers - Models src/models/mock_model.h src/models/model.h src/models/raspberry_model.h src/models/mqtt_client.h + # Headers - Debug Mode src/modes/debug_mode/debug_utils.h + # Headers - Utils src/utils/data_type_names.h src/utils/server_data.h src/utils/attributestatus.h src/utils/descriptioninfo.h + # Implementation - Controllers src/controllers/efficiencycontroller.cpp src/controllers/chargingcontroller.cpp src/controllers/homecontroller.cpp @@ -45,46 +72,65 @@ set(PROJECT_SOURCES src/controllers/buttoncontroller.cpp src/controllers/navigationcontroller.cpp src/controllers/flappybirdcontroller.cpp + src/controllers/speedcontroller.cpp + src/controllers/snakecontroller.cpp + src/controllers/tankcontroller.cpp + + # Implementation - Models src/models/mock_model.cpp src/models/model.cpp src/models/raspberry_model.cpp src/models/mqtt_client.cpp + # Implementation - Debug Mode src/modes/debug_mode/debug_utils.cpp + # Implementation - Utils src/utils/server_data.cpp src/utils/descriptioninfo.cpp + # Main src/main.cpp - - src/controllers/speedcontroller.h - src/controllers/speedcontroller.cpp ) -find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick Network Mqtt Protobuf) - -qt_add_executable(NEROApp ${PROJECT_SOURCES} - src/controllers/snakecontroller.h - src/controllers/snakecontroller.cpp - src/controllers/tankcontroller.cpp - src/controllers/tankcontroller.h) +# Create executable with all sources consolidated +qt_add_executable(NEROApp ${PROJECT_SOURCES}) +# Add resources qt_add_resources(NEROApp "configuration" PREFIX "/" FILES qtquickcontrols2.conf ) - +# Add protobuf qt_add_protobuf(NEROApp PROTO_FILES src/proto/serverdata/serverdata.proto ) -target_include_directories(${PROJECT_NAME} PUBLIC include) -include_directories("src/**") +# Fix include directories - remove the broken "src/**" syntax +target_include_directories(NEROApp PRIVATE + include + src + src/constants + src/controllers + src/models + src/modes/debug_mode + src/utils + ${CMAKE_CURRENT_BINARY_DIR} # For AutoMoc generated files +) +# Windows-specific AutoMoc target properties +if(WIN32) + set_target_properties(NEROApp PROPERTIES + AUTOGEN_COMMAND_LINE_LENGTH_MAX 2000 + AUTOGEN_PARALLEL 1 + AUTOGEN_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/NEROApp_autogen" + ) +endif() +# Link libraries target_link_libraries(NEROApp PRIVATE Qt6::Core Qt6::Gui @@ -95,6 +141,7 @@ target_link_libraries(NEROApp PRIVATE Qt6::Protobuf ) +# Optional components if (BUILD_QDS_COMPONENTS) include(${CMAKE_CURRENT_SOURCE_DIR}/qmlcomponents) endif() @@ -103,13 +150,12 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/qmlmodules) if (LINK_INSIGHT) include(${CMAKE_CURRENT_SOURCE_DIR}/insight) -endif () +endif() +# Installation include(GNUInstallDirs) install(TARGETS NEROApp BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) - - diff --git a/NERODevelopment/src/main.cpp b/NERODevelopment/src/main.cpp index a3286b0..a6a9112 100644 --- a/NERODevelopment/src/main.cpp +++ b/NERODevelopment/src/main.cpp @@ -10,10 +10,12 @@ #include "controllers/offviewcontroller.h" #include "controllers/snakecontroller.h" #include "controllers/speedcontroller.h" +#ifndef _WIN32 +#include "models/raspberry_model.h" +#endif #include "import_qml_components_plugins.h" #include "import_qml_plugins.h" #include "src/models/mock_model.h" -#include "src/models/raspberry_model.h" #include #include #include @@ -31,7 +33,9 @@ int main(int argc, char *argv[]) { Model *model; if (osName == "raspberrypi-sta") { - model = new RaspberryModel; +#ifndef _WIN32 + model = new RaspberryModel; +#endif model->connectToMQTT(); } else { model = new MockModel; From 0b4cee7d6088aaa220c689ddbb4f2ca804693c88 Mon Sep 17 00:00:00 2001 From: Jack R Date: Mon, 29 Sep 2025 18:25:19 -0400 Subject: [PATCH 2/5] mvp --- NERODevelopment/CMakeLists.txt | 69 ++--------- NERODevelopment/NERO.qmlproject.qtds | 116 ++++++++++++++++++ NERODevelopment/application.qrc | 5 + NERODevelopment/content/DescriptionModal.qml | 2 +- NERODevelopment/content/FlappyBird.qml | 12 +- NERODevelopment/content/HomeIcon.qml | 2 +- .../content/MicrophoneComponent.qml | 2 +- .../content/NavigationController.qml | 12 +- NERODevelopment/content/OffScreen2.qml | 2 +- NERODevelopment/imports/NERO/CMakeLists.txt | 2 + .../src/controllers/buttoncontroller.h | 2 +- .../src/controllers/navigationcontroller.h | 4 +- .../src/controllers/offviewcontroller.h | 22 ++-- NERODevelopment/src/main.cpp | 25 +--- NERODevelopment/src/models/mqtt_client.h | 1 - 15 files changed, 168 insertions(+), 110 deletions(-) create mode 100644 NERODevelopment/NERO.qmlproject.qtds create mode 100644 NERODevelopment/application.qrc diff --git a/NERODevelopment/CMakeLists.txt b/NERODevelopment/CMakeLists.txt index ed6ee96..9b1908a 100644 --- a/NERODevelopment/CMakeLists.txt +++ b/NERODevelopment/CMakeLists.txt @@ -1,34 +1,11 @@ cmake_minimum_required(VERSION 3.21.1) -option(LINK_INSIGHT "Link Qt Insight Tracker library" ON) -option(BUILD_QDS_COMPONENTS "Build design studio components" ON) - project(NEROApp LANGUAGES CXX) # Find Qt6 first before version checks find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick Network Mqtt Protobuf) -# Windows-specific AutoMoc fixes -if(WIN32) - # Force response files for long command lines on Windows - set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS ON) - set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES ON) - set(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "@") - - # Set AutoMoc to use response files much earlier on Windows - set(CMAKE_AUTOGEN_COMMAND_LINE_LENGTH_MAX 2000) - - # Reduce AutoMoc parallel processing on Windows to avoid command line issues - set(CMAKE_AUTOGEN_PARALLEL 1) -endif() - -# Enable AutoMoc after Windows-specific settings -set(CMAKE_AUTOMOC ON) - -# Fix Qt version check - use Qt6Core_VERSION instead of Qt6_VERSION -if (Qt6Core_VERSION VERSION_GREATER_EQUAL "6.5") - qt_standard_project_setup() -endif() +qt_standard_project_setup(REQUIRES 6.8) # Consolidate all sources in one place set(PROJECT_SOURCES @@ -91,44 +68,22 @@ set(PROJECT_SOURCES # Main src/main.cpp + + # rss + application.qrc ) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOMOC ON) # Create executable with all sources consolidated qt_add_executable(NEROApp ${PROJECT_SOURCES}) -# Add resources -qt_add_resources(NEROApp "configuration" - PREFIX "/" - FILES - qtquickcontrols2.conf -) - # Add protobuf qt_add_protobuf(NEROApp PROTO_FILES src/proto/serverdata/serverdata.proto ) -# Fix include directories - remove the broken "src/**" syntax -target_include_directories(NEROApp PRIVATE - include - src - src/constants - src/controllers - src/models - src/modes/debug_mode - src/utils - ${CMAKE_CURRENT_BINARY_DIR} # For AutoMoc generated files -) - -# Windows-specific AutoMoc target properties -if(WIN32) - set_target_properties(NEROApp PROPERTIES - AUTOGEN_COMMAND_LINE_LENGTH_MAX 2000 - AUTOGEN_PARALLEL 1 - AUTOGEN_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/NEROApp_autogen" - ) -endif() # Link libraries target_link_libraries(NEROApp PRIVATE @@ -141,16 +96,12 @@ target_link_libraries(NEROApp PRIVATE Qt6::Protobuf ) -# Optional components -if (BUILD_QDS_COMPONENTS) - include(${CMAKE_CURRENT_SOURCE_DIR}/qmlcomponents) -endif() +set(CMAKE_OBJECT_PATH_MAX 500) +# include the qml config include(${CMAKE_CURRENT_SOURCE_DIR}/qmlmodules) - -if (LINK_INSIGHT) - include(${CMAKE_CURRENT_SOURCE_DIR}/insight) -endif() +include(${CMAKE_CURRENT_SOURCE_DIR}/qmlcomponents) +include(${CMAKE_CURRENT_SOURCE_DIR}/insight) # Installation include(GNUInstallDirs) diff --git a/NERODevelopment/NERO.qmlproject.qtds b/NERODevelopment/NERO.qmlproject.qtds new file mode 100644 index 0000000..4388ba6 --- /dev/null +++ b/NERODevelopment/NERO.qmlproject.qtds @@ -0,0 +1,116 @@ + + + + + + EnvironmentId + {dc75e71e-c532-40d3-9c38-160afa0018ea} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 0 + 80 + true + true + 1 + 0 + false + true + false + 2 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + true + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop Qt 6.8.2 + Desktop Qt 6.8.2 + {63f87550-2541-4163-9631-08b7fea781da} + -1 + 0 + 0 + 0 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + 0 + + false + QML Runtime + QmlProjectManager.QmlRunConfiguration.Qml + + false + en + CurrentFile + true + true + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/NERODevelopment/application.qrc b/NERODevelopment/application.qrc new file mode 100644 index 0000000..f3b3d91 --- /dev/null +++ b/NERODevelopment/application.qrc @@ -0,0 +1,5 @@ + + + qtquickcontrols2.conf + + \ No newline at end of file diff --git a/NERODevelopment/content/DescriptionModal.qml b/NERODevelopment/content/DescriptionModal.qml index 0acb32e..bb27f70 100644 --- a/NERODevelopment/content/DescriptionModal.qml +++ b/NERODevelopment/content/DescriptionModal.qml @@ -30,7 +30,7 @@ Rectangle { Image { id: modalImage anchors.fill: parent // This makes the image fill the rectangle - source: "qrc:/content/images/neroLogo.png" // Set the image source here + source: "/qt/qml/content/images/neroLogo.png" // Set the image source here fillMode: Image.PreserveAspectCrop layer.enabled: true diff --git a/NERODevelopment/content/FlappyBird.qml b/NERODevelopment/content/FlappyBird.qml index 83427ee..786bf5a 100644 --- a/NERODevelopment/content/FlappyBird.qml +++ b/NERODevelopment/content/FlappyBird.qml @@ -18,9 +18,9 @@ Item { property int xWall1: 200 property int xWall2: 400 property int xWall3: 600 - property string pipeSrc: "qrc:/content/images/pipe.png" - property string backgroundSrc: "qrc:/content/images/bg.png" - property string birdSrc: "qrc:/content/images/flappy-bird.png" + property string pipeSrc: "/qt/qml/content/images/pipe.png" + property string backgroundSrc: "/qt/qml/content/images/bg.png" + property string birdSrc: "/qt/qml/content/images/flappy-bird.png" property bool gameOver: true property int score: 0 property bool jump: false @@ -32,9 +32,9 @@ Item { property double speed: 3 property int frameRate: 25 property bool didJump: flappyBirdController.didJump - property string birdFrame1: "qrc:/content/images/yellowbird-downflap.png" - property string birdFrame2: "qrc:/content/images/yellowbird-midflap.png" - property string birdFrame3: "qrc:/content/images/yellowbird-upflap.png" + property string birdFrame1: "/qt/qml/content/images/yellowbird-downflap.png" + property string birdFrame2: "/qt/qml/content/images/yellowbird-midflap.png" + property string birdFrame3: "/qt/qml/content/images/yellowbird-upflap.png" property int currentBirdFrame: 0 property bool startFalling: false diff --git a/NERODevelopment/content/HomeIcon.qml b/NERODevelopment/content/HomeIcon.qml index 2753074..9fb152a 100644 --- a/NERODevelopment/content/HomeIcon.qml +++ b/NERODevelopment/content/HomeIcon.qml @@ -8,7 +8,7 @@ Rectangle { property bool highlighted: false property string text: "Off" - property string source: "qrc:/content/images/zzz.png" + property string source: "/qt/qml/content/images/zzz.png" ColumnLayout { id: imageContainer diff --git a/NERODevelopment/content/MicrophoneComponent.qml b/NERODevelopment/content/MicrophoneComponent.qml index 186f9f8..477ce40 100644 --- a/NERODevelopment/content/MicrophoneComponent.qml +++ b/NERODevelopment/content/MicrophoneComponent.qml @@ -31,7 +31,7 @@ Item { height: parent.height width: parent.width visible: isTalking - source: "qrc:/content/images/microphone.svg" + source: "/qt/qml/content/images/microphone.svg" fillMode: Image.PreserveAspectFit } diff --git a/NERODevelopment/content/NavigationController.qml b/NERODevelopment/content/NavigationController.qml index 9200551..e0082db 100644 --- a/NERODevelopment/content/NavigationController.qml +++ b/NERODevelopment/content/NavigationController.qml @@ -100,7 +100,7 @@ Item { width: navigation.boxSize highlighted: selectedPageIndex === pitDrivePageIndex text: "PIT - DRIVE" - source: "qrc:/content/images/flag.png" + source: "/qt/qml/content/images/flag.png" } HomeIcon { @@ -108,7 +108,7 @@ Item { width: navigation.boxSize highlighted: selectedPageIndex === pitReversePageIndex text: "PIT - REVERSE" - source: "qrc:/content/images/reverse.png" + source: "/qt/qml/content/images/reverse.png" } HomeIcon { @@ -116,7 +116,7 @@ Item { width: navigation.boxSize highlighted: selectedPageIndex === speedPageIndex text: "PERFORMANCE" - source: "qrc:/content/images/hare.png" + source: "/qt/qml/content/images/hare.png" } HomeIcon { @@ -124,7 +124,7 @@ Item { width: navigation.boxSize highlighted: selectedPageIndex === efficiencyPageIndex text: "EFFICIENCY" - source: "qrc:/content/images/turtle.png" + source: "/qt/qml/content/images/turtle.png" } } @@ -139,7 +139,7 @@ Item { width: navigation.boxSize highlighted: selectedPageIndex === gamePageIndex text: "GAMES" - source: "qrc:/content/images/game.png" + source: "/qt/qml/content/images/game.png" visible: !gamePageOpen } @@ -165,7 +165,7 @@ Item { width: navigation.boxSize highlighted: selectedPageIndex === exitPageIndex text: "EXIT" - source: "qrc:/content/images/exit.png" + source: "/qt/qml/content/images/exit.png" } } } diff --git a/NERODevelopment/content/OffScreen2.qml b/NERODevelopment/content/OffScreen2.qml index 745d6a0..f07b3ad 100644 --- a/NERODevelopment/content/OffScreen2.qml +++ b/NERODevelopment/content/OffScreen2.qml @@ -508,7 +508,7 @@ Rectangle { anchors.right: cpBrbInterlocksTsmsContainer.left anchors.rightMargin: parent.width / 30 anchors.leftMargin: parent.width / 30 - source: "qrc:/content/images/neroLogo.png" + source: "/qt/qml/content/images/neroLogo.png" fillMode: Image.PreserveAspectFit } diff --git a/NERODevelopment/imports/NERO/CMakeLists.txt b/NERODevelopment/imports/NERO/CMakeLists.txt index 117e94d..f655f1d 100644 --- a/NERODevelopment/imports/NERO/CMakeLists.txt +++ b/NERODevelopment/imports/NERO/CMakeLists.txt @@ -15,4 +15,6 @@ qt6_add_qml_module(NERO DirectoryFontLoader.qml EventListModel.qml EventListSimulator.qml + DEPENDENCIES + QtQuick ) diff --git a/NERODevelopment/src/controllers/buttoncontroller.h b/NERODevelopment/src/controllers/buttoncontroller.h index 57d134d..8546213 100644 --- a/NERODevelopment/src/controllers/buttoncontroller.h +++ b/NERODevelopment/src/controllers/buttoncontroller.h @@ -1,7 +1,7 @@ #ifndef BUTTONCONTROLLER_H #define BUTTONCONTROLLER_H -#include "src/models/model.h" +#include "../models/model.h" #include class ButtonController : public QObject { diff --git a/NERODevelopment/src/controllers/navigationcontroller.h b/NERODevelopment/src/controllers/navigationcontroller.h index e8e2e60..661e74c 100644 --- a/NERODevelopment/src/controllers/navigationcontroller.h +++ b/NERODevelopment/src/controllers/navigationcontroller.h @@ -1,8 +1,8 @@ #ifndef NAVIGATIONCONTROLLER_H #define NAVIGATIONCONTROLLER_H -#include "src/controllers/buttoncontroller.h" -#include "src/models/model.h" +#include "../controllers/buttoncontroller.h" +#include "../models/model.h" #include class NavigationController : public ButtonController { diff --git a/NERODevelopment/src/controllers/offviewcontroller.h b/NERODevelopment/src/controllers/offviewcontroller.h index ca8c6e3..e48c4f8 100644 --- a/NERODevelopment/src/controllers/offviewcontroller.h +++ b/NERODevelopment/src/controllers/offviewcontroller.h @@ -89,38 +89,38 @@ public slots: DescriptionInfo("GLVMS", "The master switch that allows for 24 volt to power low " "voltage system.", - "qrc:/content/images/glv.jpg"), + "qrc://qt/qml/content/images/glv.jpg"), DescriptionInfo("Side BRBs", "Emergency shutdown switches to fully and immediately " "power down low voltage and tractive.", - "qrc:/content/images/sidebrb.jpg"), + "qrc://qt/qml/content/images/sidebrb.jpg"), DescriptionInfo("BMS", "The battery management system to monitor state and " "faults of accumulator.", - "qrc:/content/images/imd.jpg"), + "qrc://qt/qml/content/images/imd.jpg"), DescriptionInfo( "IMD", "Monitors isolation between the high and low voltage systems.", - "qrc:/content/images/imd.jpg"), + "qrc://qt/qml/content/images/imd.jpg"), DescriptionInfo( "CAN", "Monitors the status of intercomputer communication system.", - "qrc:/content/images/imd.jpg"), + "qrc://qt/qml/content/images/imd.jpg"), DescriptionInfo("BSPD", "Brake System Plausibility Device which detects " "inconsistencies in the brake sensor.", - "qrc:/content/images/bspd.jpg"), + "qrc://qt/qml/content/images/bspd.jpg"), DescriptionInfo("BOTS", "Brake over travel switch which detects if we have lost " "pressure in the brakes.", - "qrc:/content/images/bots.jpg"), + "qrc://qt/qml/content/images/bots.jpg"), DescriptionInfo("INERTIA", "Measures if there is a crash.", - "qrc:/content/images/inertia.jpg"), + "qrc://qt/qml/content/images/inertia.jpg"), DescriptionInfo("Pit BRB", "Driver tractive shutdown button.", - "qrc:/content/images/cockpitBrb.jpg"), + "qrc://qt/qml/content/images/cockpitBrb.jpg"), DescriptionInfo("INTERLOCKS", "Detects if all high voltage connections are made.", - "qrc:/content/images/interlocks.jpg"), + "qrc://qt/qml/content/images/interlocks.jpg"), DescriptionInfo("TSMS", "Toggles tractive system.", - "qrc:/content/images/tsms.jpg"), + "qrc://qt/qml/content/images/tsms.jpg"), }; }; diff --git a/NERODevelopment/src/main.cpp b/NERODevelopment/src/main.cpp index a6a9112..5338c62 100644 --- a/NERODevelopment/src/main.cpp +++ b/NERODevelopment/src/main.cpp @@ -15,7 +15,7 @@ #endif #include "import_qml_components_plugins.h" #include "import_qml_plugins.h" -#include "src/models/mock_model.h" +#include "models/mock_model.h" #include #include #include @@ -54,15 +54,6 @@ int main(int argc, char *argv[]) { EfficiencyController efficencyController(model); SpeedController speedController(model); - const QUrl url(u"qrc:Main/main.qml"_qs); - QObject::connect( - &engine, &QQmlApplicationEngine::objectCreated, &app, - [url](QObject *obj, const QUrl &objUrl) { - if (!obj && url == objUrl) - QCoreApplication::exit(-1); - }, - Qt::QueuedConnection); - engine.rootContext()->setContextProperty("homeController", &homeController); engine.rootContext()->setContextProperty("headerController", &headerController); @@ -77,16 +68,10 @@ int main(int argc, char *argv[]) { &efficencyController); engine.rootContext()->setContextProperty("speedController", &speedController); - engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); - - engine.addImportPath(QCoreApplication::applicationDirPath() + "/qml"); - engine.addImportPath(":/"); - - engine.load(url); - - if (engine.rootObjects().isEmpty()) { - return -1; - } + QObject::connect(&engine, &QQmlApplicationEngine::objectCreationFailed, + &app, []() { QCoreApplication::exit(-1); }, + Qt::QueuedConnection); + engine.loadFromModule("content", "App"); return app.exec(); } diff --git a/NERODevelopment/src/models/mqtt_client.h b/NERODevelopment/src/models/mqtt_client.h index 3892266..8e28bae 100644 --- a/NERODevelopment/src/models/mqtt_client.h +++ b/NERODevelopment/src/models/mqtt_client.h @@ -5,7 +5,6 @@ #include #include #include -#include /** * @brief The MqttClient class, wraps the native QMqtt client to functions we From 76242c446bb751ac07cab3bc230d612feb408c15 Mon Sep 17 00:00:00 2001 From: Jack R Date: Mon, 29 Sep 2025 18:28:40 -0400 Subject: [PATCH 3/5] add submodules --- .gitmodules | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..68c6641 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "deps/qtmqtt"] + path = deps/qtmqtt + url = https://github.com/qt/qtmqtt +[submodule "deps/protobuf"] + path = deps/protobuf + url = https://github.com/protocolbuffers/protobuf From 5402832b0d4584f49fd9378ba41d2909470c1e9d Mon Sep 17 00:00:00 2001 From: Jack R Date: Mon, 29 Sep 2025 18:34:07 -0400 Subject: [PATCH 4/5] add submodules --- deps/protobuf | 1 + deps/qtmqtt | 1 + 2 files changed, 2 insertions(+) create mode 160000 deps/protobuf create mode 160000 deps/qtmqtt diff --git a/deps/protobuf b/deps/protobuf new file mode 160000 index 0000000..1449d47 --- /dev/null +++ b/deps/protobuf @@ -0,0 +1 @@ +Subproject commit 1449d4760bed71e6ec532742277ae6ec584bf4d4 diff --git a/deps/qtmqtt b/deps/qtmqtt new file mode 160000 index 0000000..13b1e8f --- /dev/null +++ b/deps/qtmqtt @@ -0,0 +1 @@ +Subproject commit 13b1e8f4dbd676c96369d40ba5b2095e7d70bd2c From 6c13e52126957914aead6e506db600181ed67594 Mon Sep 17 00:00:00 2001 From: wyattb Date: Tue, 30 Sep 2025 21:44:37 -0400 Subject: [PATCH 5/5] git ignore and better 6.8.3 qtmqtt branch subdmodule --- .gitignore | 1 - .gitmodules | 1 + deps/qtmqtt | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a9f2f76..68500d1 100644 --- a/.gitignore +++ b/.gitignore @@ -72,4 +72,3 @@ build* # -------- *.dll *.exe - diff --git a/.gitmodules b/.gitmodules index 68c6641..60304e9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,7 @@ [submodule "deps/qtmqtt"] path = deps/qtmqtt url = https://github.com/qt/qtmqtt + ignore = dirty [submodule "deps/protobuf"] path = deps/protobuf url = https://github.com/protocolbuffers/protobuf diff --git a/deps/qtmqtt b/deps/qtmqtt index 13b1e8f..6a876cb 160000 --- a/deps/qtmqtt +++ b/deps/qtmqtt @@ -1 +1 @@ -Subproject commit 13b1e8f4dbd676c96369d40ba5b2095e7d70bd2c +Subproject commit 6a876cb32162873a9183ea847bcaef57ef4dfd01