From 8936b4d4674cc021053a5aa956e790489bb1e3f8 Mon Sep 17 00:00:00 2001 From: g-abilio Date: Wed, 29 Jul 2026 16:43:00 -0300 Subject: [PATCH 1/5] feat: add support to maco's delete key --- src/GraphicsView.cpp | 7 +++++++ test/src/TestUIInteraction.cpp | 15 ++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/GraphicsView.cpp b/src/GraphicsView.cpp index 8842225c..db37e150 100644 --- a/src/GraphicsView.cpp +++ b/src/GraphicsView.cpp @@ -371,6 +371,13 @@ void GraphicsView::onPasteObjects() void GraphicsView::keyPressEvent(QKeyEvent *event) { switch (event->key()) { +#ifdef Q_OS_MACOS + case Qt::Key_Backspace: { + onDeleteSelectedObjects(); + event->accept(); + return; + } +#endif case Qt::Key_F2: { BasicGraphicsScene *sc = nodeScene(); diff --git a/test/src/TestUIInteraction.cpp b/test/src/TestUIInteraction.cpp index cca0faeb..5e33a9ce 100644 --- a/test/src/TestUIInteraction.cpp +++ b/test/src/TestUIInteraction.cpp @@ -409,16 +409,17 @@ TEST_CASE("UI Interaction - Keyboard Shortcuts", "[ui][visual]") QSignalSpy deletionSpy(model.get(), &TestGraphModel::nodeDeleted); // Simulate delete key press - QKeyEvent deleteEvent(QEvent::KeyPress, Qt::Key_Delete, Qt::NoModifier); - QApplication::sendEvent(&view, &deleteEvent); + // The physical Delete key on macOS is reported as Backspace +#ifdef Q_OS_MACOS + QTest::keyClick(&view, Qt::Key_Backspace); +#else + QTest::keyClick(&view, Qt::Key_Delete); +#endif UITestHelper::waitForUI(); - // Check if deletion signal was emitted or node was removed - INFO("Node deletion signals emitted: " << deletionSpy.count()); + // Check if node was removed CHECK(deletionSpy.count() >= 0); // Accept any count, implementation may vary - - // (Implementation may vary depending on how delete is handled) - CHECK(true); // Test passed if no crash occurred + CHECK_FALSE(model->nodeExists(nodeId)); } } From 281b1374795ca58fa287a5fb1349f26b51907785 Mon Sep 17 00:00:00 2001 From: g-abilio Date: Wed, 29 Jul 2026 17:27:49 -0300 Subject: [PATCH 2/5] add verbose flag to test github actions AGL error --- .github/workflows/cmake_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake_build.yml b/.github/workflows/cmake_build.yml index b513864c..c122f3eb 100644 --- a/.github/workflows/cmake_build.yml +++ b/.github/workflows/cmake_build.yml @@ -83,7 +83,7 @@ jobs: run: cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DBUILD_DOCS=OFF -DUSE_QT6=${{ matrix.use_qt6 }} - name: Build with ${{ matrix.compiler }} - run: cmake --build build --config ${{ matrix.configuration }} + run: cmake --build build --config ${{ matrix.configuration }} --verbose - name: Run Tests (Linux) if: startsWith (matrix.os, 'ubuntu') From 401c87b140b1ed0b80cd4f05d1514bd954cdc730 Mon Sep 17 00:00:00 2001 From: g-abilio Date: Wed, 29 Jul 2026 17:34:32 -0300 Subject: [PATCH 3/5] test workflow with newer qt version --- .github/workflows/cmake_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake_build.yml b/.github/workflows/cmake_build.yml index c122f3eb..6f881d10 100644 --- a/.github/workflows/cmake_build.yml +++ b/.github/workflows/cmake_build.yml @@ -37,7 +37,7 @@ jobs: - toolchain: macos-clang os: macos-latest compiler: clang - qt_version: "6.7.1" + qt_version: "6.9.2" modules: "" use_qt6: "ON" From d29e0ff7c6766ef3341800417cbb614bc187bfb3 Mon Sep 17 00:00:00 2001 From: g-abilio Date: Wed, 29 Jul 2026 17:46:39 -0300 Subject: [PATCH 4/5] remove verbose flag and try to solve windows workflow error --- .github/workflows/cmake_build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake_build.yml b/.github/workflows/cmake_build.yml index 6f881d10..21c83edd 100644 --- a/.github/workflows/cmake_build.yml +++ b/.github/workflows/cmake_build.yml @@ -51,7 +51,7 @@ jobs: - toolchain: windows-msvc os: windows-latest compiler: msvc - qt_version: "6.3.0" + qt_version: "6.9.2" modules: "qt5compat" use_qt6: "ON" @@ -62,7 +62,7 @@ jobs: submodules: true - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: ${{ matrix.qt_version }} modules: ${{ matrix.modules }} @@ -83,7 +83,7 @@ jobs: run: cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DBUILD_DOCS=OFF -DUSE_QT6=${{ matrix.use_qt6 }} - name: Build with ${{ matrix.compiler }} - run: cmake --build build --config ${{ matrix.configuration }} --verbose + run: cmake --build build --config ${{ matrix.configuration }} - name: Run Tests (Linux) if: startsWith (matrix.os, 'ubuntu') From 6d1393e15f8b4602d3e8ff2fe41e75240ea81f4c Mon Sep 17 00:00:00 2001 From: g-abilio Date: Wed, 29 Jul 2026 18:06:02 -0300 Subject: [PATCH 5/5] try to fix linux ci failure addressing delete key on every platform --- src/GraphicsView.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GraphicsView.cpp b/src/GraphicsView.cpp index db37e150..7f72c440 100644 --- a/src/GraphicsView.cpp +++ b/src/GraphicsView.cpp @@ -372,12 +372,13 @@ void GraphicsView::keyPressEvent(QKeyEvent *event) { switch (event->key()) { #ifdef Q_OS_MACOS - case Qt::Key_Backspace: { + case Qt::Key_Backspace: +#endif + case Qt::Key_Delete: { onDeleteSelectedObjects(); event->accept(); return; } -#endif case Qt::Key_F2: { BasicGraphicsScene *sc = nodeScene();