Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kdsingleapplication for 
openSUSE:Factory checked in at 2026-04-23 17:09:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kdsingleapplication (Old)
 and      /work/SRC/openSUSE:Factory/.kdsingleapplication.new.11940 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kdsingleapplication"

Thu Apr 23 17:09:08 2026 rev:4 rq:1348893 version:1.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/kdsingleapplication/kdsingleapplication.changes  
2025-05-27 18:42:35.849579172 +0200
+++ 
/work/SRC/openSUSE:Factory/.kdsingleapplication.new.11940/kdsingleapplication.changes
       2026-04-23 17:13:44.311209444 +0200
@@ -1,0 +2,7 @@
+Thu Apr 23 08:33:15 UTC 2026 - Christophe Marin <[email protected]>
+
+- Update to 1.2.1
+  * Fix crash when message handler spins the event loop
+    resulting in double-free
+
+-------------------------------------------------------------------

Old:
----
  kdsingleapplication-1.2.0.tar.gz
  kdsingleapplication-1.2.0.tar.gz.asc

New:
----
  kdsingleapplication-1.2.1.tar.gz
  kdsingleapplication-1.2.1.tar.gz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kdsingleapplication.spec ++++++
--- /var/tmp/diff_new_pack.ofkdFi/_old  2026-04-23 17:13:47.511341234 +0200
+++ /var/tmp/diff_new_pack.ofkdFi/_new  2026-04-23 17:13:47.527341893 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package kdsingleapplication
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,7 +26,7 @@
 %define sover 1_2
 %endif
 Name:           kdsingleapplication%{?pkg_suffix}
-Version:        1.2.0
+Version:        1.2.1
 Release:        0
 Summary:        Helper class for single-instance policy applications
 License:        MIT


++++++ kdsingleapplication-1.2.0.tar.gz -> kdsingleapplication-1.2.1.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/KDSingleApplication-1.2.0/.github/dependabot.yml 
new/KDSingleApplication-1.2.1/.github/dependabot.yml
--- old/KDSingleApplication-1.2.0/.github/dependabot.yml        2025-05-26 
11:10:08.000000000 +0200
+++ new/KDSingleApplication-1.2.1/.github/dependabot.yml        2026-04-22 
14:08:26.000000000 +0200
@@ -7,4 +7,8 @@
   - package-ecosystem: "github-actions"
     directory: "/"
     schedule:
-      interval: daily
+      interval: monthly
+    groups:
+      all-dependencies:
+        patterns:
+          - "*"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/KDSingleApplication-1.2.0/.github/workflows/build.yml 
new/KDSingleApplication-1.2.1/.github/workflows/build.yml
--- old/KDSingleApplication-1.2.0/.github/workflows/build.yml   2025-05-26 
11:10:08.000000000 +0200
+++ new/KDSingleApplication-1.2.1/.github/workflows/build.yml   2026-04-22 
14:08:26.000000000 +0200
@@ -33,6 +33,7 @@
             cmake_osx_architectures: "x86_64"
 
           - qt_version: "6.5.3"
+          - qt_version: "6.10.0" # Bump to latest freely
 
     steps:
       - name: Install Qt with options and default aqtversion
@@ -43,7 +44,7 @@
           cache: true
 
       - name: Checkout sources
-        uses: actions/checkout@v4
+        uses: actions/checkout@v6
 
       - name: Install ninja-build tool (must be after Qt due PATH changes)
         uses: turtlesec-no/get-ninja@main
@@ -92,11 +93,11 @@
     runs-on: ubuntu-latest
     steps:
     - name: Checkout
-      uses: actions/checkout@v4
+      uses: actions/checkout@v6
     - name: Build FreeBSD
       env:
         QT_QPA_PLATFORM: offscreen
-      uses: vmactions/[email protected]
+      uses: vmactions/[email protected]
       with:
         usesh: true
         mem: 4096
@@ -115,11 +116,11 @@
     runs-on: ubuntu-latest
     steps:
     - name: Checkout
-      uses: actions/checkout@v4
+      uses: actions/checkout@v6
     - name: Build OpenBSD
       env:
         QT_QPA_PLATFORM: offscreen
-      uses: vmactions/[email protected]
+      uses: vmactions/[email protected]
       with:
         usesh: true
         mem: 4096
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/KDSingleApplication-1.2.0/.github/workflows/create_release.yml 
new/KDSingleApplication-1.2.1/.github/workflows/create_release.yml
--- old/KDSingleApplication-1.2.0/.github/workflows/create_release.yml  
2025-05-26 11:10:08.000000000 +0200
+++ new/KDSingleApplication-1.2.1/.github/workflows/create_release.yml  
2026-04-22 14:08:26.000000000 +0200
@@ -25,12 +25,12 @@
     runs-on: ubuntu-24.04
     steps:
       - name: Checkout sources
-        uses: actions/checkout@v4
+        uses: actions/checkout@v6
         with:
           fetch-depth: 0
 
       - name: Checkout CI tools
-        uses: actions/checkout@v4
+        uses: actions/checkout@v6
         with:
           repository: KDABLabs/ci-release-tools
           path: ci-release-tools
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/KDSingleApplication-1.2.0/.github/workflows/documentation.yml 
new/KDSingleApplication-1.2.1/.github/workflows/documentation.yml
--- old/KDSingleApplication-1.2.0/.github/workflows/documentation.yml   
2025-05-26 11:10:08.000000000 +0200
+++ new/KDSingleApplication-1.2.1/.github/workflows/documentation.yml   
2026-04-22 14:08:26.000000000 +0200
@@ -39,7 +39,7 @@
           cache: true
 
       - name: Checkout sources
-        uses: actions/checkout@v4
+        uses: actions/checkout@v6
         with:
           submodules: recursive
 
@@ -50,7 +50,7 @@
         run: cmake --build ./build --target docs
 
       - name: Upload artifact
-        uses: actions/upload-pages-artifact@v3
+        uses: actions/upload-pages-artifact@v5
         with:
           path: build/docs/api/html/
 
@@ -65,4 +65,4 @@
     steps:
       - name: Deploy to GitHub Pages
         id: deployment
-        uses: actions/deploy-pages@v4
+        uses: actions/deploy-pages@v5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/KDSingleApplication-1.2.0/.github/workflows/nightly.yml 
new/KDSingleApplication-1.2.1/.github/workflows/nightly.yml
--- old/KDSingleApplication-1.2.0/.github/workflows/nightly.yml 2025-05-26 
11:10:08.000000000 +0200
+++ new/KDSingleApplication-1.2.1/.github/workflows/nightly.yml 2026-04-22 
14:08:26.000000000 +0200
@@ -54,7 +54,7 @@
           sudo apt update -qq
           echo ${{ join(matrix.config.apt_pgks, ' ') }} | xargs sudo apt 
install -y
 
-      - uses: actions/checkout@v4
+      - uses: actions/checkout@v6
         #with:
           #ref: '2.0' # schedule.cron do not allow branch setting
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/KDSingleApplication-1.2.0/.gitignore 
new/KDSingleApplication-1.2.1/.gitignore
--- old/KDSingleApplication-1.2.0/.gitignore    2025-05-26 11:10:08.000000000 
+0200
+++ new/KDSingleApplication-1.2.1/.gitignore    2026-04-22 14:08:26.000000000 
+0200
@@ -3,3 +3,5 @@
 .cmake/
 CMakeLists.txt.*
 /build*/
+compile_commands.json
+.cache
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/KDSingleApplication-1.2.0/.pre-commit-config.yaml 
new/KDSingleApplication-1.2.1/.pre-commit-config.yaml
--- old/KDSingleApplication-1.2.0/.pre-commit-config.yaml       2025-05-26 
11:10:08.000000000 +0200
+++ new/KDSingleApplication-1.2.1/.pre-commit-config.yaml       2026-04-22 
14:08:26.000000000 +0200
@@ -6,7 +6,7 @@
 exclude: ^(cmake/ECM|cmake/KDAB/|docs/api/doxygen-awesome.css)
 repos:
 - repo: https://github.com/pre-commit/pre-commit-hooks
-  rev: v5.0.0
+  rev: v6.0.0
   hooks:
   - id: trailing-whitespace
   - id: end-of-file-fixer
@@ -19,7 +19,7 @@
   - id: destroyed-symlinks
   - id: check-executables-have-shebangs
 - repo: https://github.com/pre-commit/mirrors-clang-format
-  rev: v20.1.3
+  rev: v21.1.2
   hooks:
   - id: clang-format
     exclude: (.json)
@@ -42,6 +42,6 @@
     language: ruby
     files: \.(md|mdown|markdown)$
 - repo: https://github.com/fsfe/reuse-tool
-  rev: v5.0.2
+  rev: v6.2.0
   hooks:
   - id: reuse
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/KDSingleApplication-1.2.0/CMakePresets.json 
new/KDSingleApplication-1.2.1/CMakePresets.json
--- old/KDSingleApplication-1.2.0/CMakePresets.json     1970-01-01 
01:00:00.000000000 +0100
+++ new/KDSingleApplication-1.2.1/CMakePresets.json     2026-04-22 
14:08:26.000000000 +0200
@@ -0,0 +1,49 @@
+{
+  "version": 5,
+  "configurePresets": [
+    {
+      "name": "base",
+      "generator": "Ninja",
+      "binaryDir": "${sourceDir}/build-${presetName}",
+      "hidden": true,
+      "cacheVariables": {
+        "CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
+      },
+      "warnings": {
+        "uninitialized": true
+      },
+      "errors": {
+        "dev": true
+      }
+    },
+    {
+      "name": "dev",
+      "inherits": ["base"],
+      "cacheVariables": {
+        "CMAKE_BUILD_TYPE": "Debug",
+        "KDSingleApplication_DEVELOPER_MODE": "ON",
+        "KDSingleApplication_TESTS": "ON",
+        "KDSingleApplication_EXAMPLES": "ON"
+      }
+    },
+    {
+      "name": "release",
+      "inherits": "base",
+      "cacheVariables": {
+        "CMAKE_BUILD_TYPE": "Release",
+        "KDSingleApplication_DEVELOPER_MODE": "OFF",
+        "KDSingleApplication_TESTS": "OFF",
+        "KDSingleApplication_EXAMPLES": "OFF"
+      }
+    },
+  {
+      "name": "dev-asan",
+      "inherits": ["dev"],
+      "cacheVariables": {
+        "CMAKE_CXX_FLAGS": "-DQT_FORCE_ASSERTS -fsanitize=address 
-fsanitize=undefined -fno-optimize-sibling-calls",
+        "CMAKE_SHARED_LINKER_FLAGS": "-fsanitize=address -fsanitize=undefined 
-fno-omit-frame-pointer",
+        "CMAKE_EXE_LINKER_FLAGS": "-fsanitize=address -fsanitize=undefined 
-fno-omit-frame-pointer"
+      }
+    }
+  ]
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/KDSingleApplication-1.2.0/Changelog 
new/KDSingleApplication-1.2.1/Changelog
--- old/KDSingleApplication-1.2.0/Changelog     2025-05-26 11:10:08.000000000 
+0200
+++ new/KDSingleApplication-1.2.1/Changelog     2026-04-22 14:08:26.000000000 
+0200
@@ -1,3 +1,6 @@
+* v1.2.1
+ - Fix crash when message handler spins the event loop resulting in 
double-free (#114)
+
 * v1.2.0
  - KDSingleApplication now looks for Qt6 by default, rather than Qt5. If your 
Qt5
    build broke, pass -DKDSingleApplication_QT6=OFF to CMake.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/KDSingleApplication-1.2.0/REUSE.toml 
new/KDSingleApplication-1.2.1/REUSE.toml
--- old/KDSingleApplication-1.2.0/REUSE.toml    2025-05-26 11:10:08.000000000 
+0200
+++ new/KDSingleApplication-1.2.1/REUSE.toml    2026-04-22 14:08:26.000000000 
+0200
@@ -12,7 +12,7 @@
 
 #misc config files
 [[annotations]]
-path = ["version.txt", ".clang-format", ".cmake-format.py", ".codespellrc", 
".gitignore", ".gitreview", ".krazy", ".mdlrc", ".mdlrc.rb", 
".pre-commit-config.yaml", "docs/api/Doxyfile.cmake", "distro/**", "REUSE.toml"]
+path = ["CMakePresets.json", "version.txt", ".clang-format", 
".cmake-format.py", ".codespellrc", ".gitignore", ".gitreview", ".krazy", 
".mdlrc", ".mdlrc.rb", ".pre-commit-config.yaml", "docs/api/Doxyfile.cmake", 
"distro/**", "REUSE.toml"]
 precedence = "aggregate"
 SPDX-FileCopyrightText = "Klarälvdalens Datakonsult AB, a KDAB Group company 
<[email protected]>"
 SPDX-License-Identifier = "MIT"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/KDSingleApplication-1.2.0/distro/debian.changelog 
new/KDSingleApplication-1.2.1/distro/debian.changelog
--- old/KDSingleApplication-1.2.0/distro/debian.changelog       2025-05-26 
11:10:08.000000000 +0200
+++ new/KDSingleApplication-1.2.1/distro/debian.changelog       1970-01-01 
01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-kdsingleapplication (1.1.0) release candidate; urgency=high
-
-  * 1.1.0 final
-
- -- Allen Winter <[email protected]>  Fri, 22 December 2023 10:00:00 -0500
-
-kdsingleapplication (1.0.0) release candidate; urgency=high
-
-  * 1.0.0 final
-
- -- Allen Winter <[email protected]>  Mon, 17 July 2023 12:00:00 -0500
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/KDSingleApplication-1.2.0/distro/debian.compat 
new/KDSingleApplication-1.2.1/distro/debian.compat
--- old/KDSingleApplication-1.2.0/distro/debian.compat  2025-05-26 
11:10:08.000000000 +0200
+++ new/KDSingleApplication-1.2.1/distro/debian.compat  1970-01-01 
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/KDSingleApplication-1.2.0/distro/qt5-debian.control 
new/KDSingleApplication-1.2.1/distro/qt5-debian.control
--- old/KDSingleApplication-1.2.0/distro/qt5-debian.control     2025-05-26 
11:10:08.000000000 +0200
+++ new/KDSingleApplication-1.2.1/distro/qt5-debian.control     1970-01-01 
01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-Source: kdsingleapplication
-Section: Miscellaneous
-Priority: optional
-Maintainer: Allen Winter <[email protected]>
-Build-Depends: debhelper (>=9), cdbs, cmake
-Standards-Version: 3.9.6
-Homepage: https://github.com/KDAB/KDSingleApplication
-
-Package: qt5-kdsingleapplication
-Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}
-Description: KDAB's helper class for Qt5 single-instance policy applications
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/KDSingleApplication-1.2.0/distro/qt5-debian.rules 
new/KDSingleApplication-1.2.1/distro/qt5-debian.rules
--- old/KDSingleApplication-1.2.0/distro/qt5-debian.rules       2025-05-26 
11:10:08.000000000 +0200
+++ new/KDSingleApplication-1.2.1/distro/qt5-debian.rules       1970-01-01 
01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-#!/usr/bin/make -f
-DEB_CMAKE_EXTRA_FLAGS = -DCMAKE_BUILD_TYPE=Release 
-DKDSingleApplication_QT6=False -DKDSingleApplication_STATIC=True
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/cmake.mk
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/KDSingleApplication-1.2.0/distro/qt5-kdsingleapplication.dsc 
new/KDSingleApplication-1.2.1/distro/qt5-kdsingleapplication.dsc
--- old/KDSingleApplication-1.2.0/distro/qt5-kdsingleapplication.dsc    
2025-05-26 11:10:08.000000000 +0200
+++ new/KDSingleApplication-1.2.1/distro/qt5-kdsingleapplication.dsc    
1970-01-01 01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-Format: 1.0
-Source: kdsingleapplication
-Version: 1.1.0-1
-Binary: kdsingleapplication
-Maintainer: Allen Winter <[email protected]>
-Architecture: any
-Build-Depends: debhelper (>=9), cdbs, cmake, qtbase5-dev
-
-Files:
- 00000000000000000000000000000000 00000 qt5-kdsingleapplication-1.1.0.tar.gz
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/KDSingleApplication-1.2.0/distro/qt6-debian.control 
new/KDSingleApplication-1.2.1/distro/qt6-debian.control
--- old/KDSingleApplication-1.2.0/distro/qt6-debian.control     2025-05-26 
11:10:08.000000000 +0200
+++ new/KDSingleApplication-1.2.1/distro/qt6-debian.control     1970-01-01 
01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-Source: kdsingleapplication
-Section: Miscellaneous
-Priority: optional
-Maintainer: Allen Winter <[email protected]>
-Build-Depends: debhelper (>=9), cdbs, cmake
-Standards-Version: 3.9.6
-Homepage: https://github.com/KDAB/KDSingleApplication
-
-Package: qt6-kdsingleapplication
-Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}
-Description: KDAB's helper class for Qt5 single-instance policy applications
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/KDSingleApplication-1.2.0/distro/qt6-debian.rules 
new/KDSingleApplication-1.2.1/distro/qt6-debian.rules
--- old/KDSingleApplication-1.2.0/distro/qt6-debian.rules       2025-05-26 
11:10:08.000000000 +0200
+++ new/KDSingleApplication-1.2.1/distro/qt6-debian.rules       1970-01-01 
01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-#!/usr/bin/make -f
-DEB_CMAKE_EXTRA_FLAGS = -DCMAKE_BUILD_TYPE=Release 
-DKDSingleApplication_QT6=True -DKDSingleApplication_STATIC=True
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/cmake.mk
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/KDSingleApplication-1.2.0/distro/qt6-kdsingleapplication.dsc 
new/KDSingleApplication-1.2.1/distro/qt6-kdsingleapplication.dsc
--- old/KDSingleApplication-1.2.0/distro/qt6-kdsingleapplication.dsc    
2025-05-26 11:10:08.000000000 +0200
+++ new/KDSingleApplication-1.2.1/distro/qt6-kdsingleapplication.dsc    
1970-01-01 01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-Format: 1.0
-Source: kdsingleapplication
-Version: 1.1.0-1
-Binary: kdsingleapplication
-Maintainer: Allen Winter <[email protected]>
-Architecture: any
-Build-Depends: debhelper (>=9), cdbs, cmake, qt6-base-dev, libgl1-mesa-dev, 
libfontconfig-dev, libfreetype-dev
-
-Files:
- 00000000000000000000000000000000 00000 qt6-kdsingleapplication-1.1.0.tar.gz
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/KDSingleApplication-1.2.0/src/kdsingleapplication_localsocket.cpp 
new/KDSingleApplication-1.2.1/src/kdsingleapplication_localsocket.cpp
--- old/KDSingleApplication-1.2.0/src/kdsingleapplication_localsocket.cpp       
2025-05-26 11:10:08.000000000 +0200
+++ new/KDSingleApplication-1.2.1/src/kdsingleapplication_localsocket.cpp       
2026-04-22 14:08:26.000000000 +0200
@@ -322,8 +322,8 @@
 
     if (ds.commitTransaction()) {
         qCDebug(kdsaLocalSocket) << "Got a complete message:" << message;
-        Q_EMIT messageReceived(message);
         m_clients.erase(i);
+        Q_EMIT messageReceived(message);
         return true;
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/KDSingleApplication-1.2.0/tests/auto/CMakeLists.txt 
new/KDSingleApplication-1.2.1/tests/auto/CMakeLists.txt
--- old/KDSingleApplication-1.2.0/tests/auto/CMakeLists.txt     2025-05-26 
11:10:08.000000000 +0200
+++ new/KDSingleApplication-1.2.1/tests/auto/CMakeLists.txt     2026-04-22 
14:08:26.000000000 +0200
@@ -9,3 +9,4 @@
 add_subdirectory(simpletest)
 add_subdirectory(stresstest)
 add_subdirectory(namelengthtest)
+add_subdirectory(disconnectduringreadtest)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/KDSingleApplication-1.2.0/tests/auto/disconnectduringreadtest/CMakeLists.txt
 
new/KDSingleApplication-1.2.1/tests/auto/disconnectduringreadtest/CMakeLists.txt
--- 
old/KDSingleApplication-1.2.0/tests/auto/disconnectduringreadtest/CMakeLists.txt
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/KDSingleApplication-1.2.1/tests/auto/disconnectduringreadtest/CMakeLists.txt
    2026-04-22 14:08:26.000000000 +0200
@@ -0,0 +1,11 @@
+# This file is part of KDSingleApplication.
+#
+# SPDX-FileCopyrightText: 2026 Klarälvdalens Datakonsult AB, a KDAB Group 
company <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+# Contact KDAB at <[email protected]> for commercial licensing options.
+#
+
+add_subdirectory(disconnectduringreadtest)
+add_subdirectory(test)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/KDSingleApplication-1.2.0/tests/auto/disconnectduringreadtest/disconnectduringreadtest/CMakeLists.txt
 
new/KDSingleApplication-1.2.1/tests/auto/disconnectduringreadtest/disconnectduringreadtest/CMakeLists.txt
--- 
old/KDSingleApplication-1.2.0/tests/auto/disconnectduringreadtest/disconnectduringreadtest/CMakeLists.txt
   1970-01-01 01:00:00.000000000 +0100
+++ 
new/KDSingleApplication-1.2.1/tests/auto/disconnectduringreadtest/disconnectduringreadtest/CMakeLists.txt
   2026-04-22 14:08:26.000000000 +0200
@@ -0,0 +1,16 @@
+# This file is part of KDSingleApplication.
+#
+# SPDX-FileCopyrightText: 2020 Klarälvdalens Datakonsult AB, a KDAB Group 
company <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+# Contact KDAB at <[email protected]> for commercial licensing options.
+#
+set(disconnectduringreadtest_SRCS main.cpp)
+add_executable(
+    disconnectduringreadtest
+    ${disconnectduringreadtest_SRCS}
+)
+target_link_libraries(
+    disconnectduringreadtest Qt::Widgets kdsingleapplication
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/KDSingleApplication-1.2.0/tests/auto/disconnectduringreadtest/disconnectduringreadtest/main.cpp
 
new/KDSingleApplication-1.2.1/tests/auto/disconnectduringreadtest/disconnectduringreadtest/main.cpp
--- 
old/KDSingleApplication-1.2.0/tests/auto/disconnectduringreadtest/disconnectduringreadtest/main.cpp
 1970-01-01 01:00:00.000000000 +0100
+++ 
new/KDSingleApplication-1.2.1/tests/auto/disconnectduringreadtest/disconnectduringreadtest/main.cpp
 2026-04-22 14:08:26.000000000 +0200
@@ -0,0 +1,64 @@
+/*
+  This file is part of KDSingleApplication.
+
+  SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group 
company <[email protected]>
+
+  SPDX-License-Identifier: MIT
+
+  Contact KDAB at <[email protected]> for commercial licensing options.
+*/
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QStringList>
+#include <QtCore/QString>
+#include <QtCore/QTimer>
+
+#include <kdsingleapplication.h>
+
+#include <iostream>
+
+#if defined(Q_OS_WIN)
+#include <io.h>
+#include <fcntl.h>
+#endif
+
+int main(int argc, char **argv)
+{
+#if defined(Q_OS_WIN)
+    _setmode(_fileno(stdout), _O_BINARY);
+#endif
+
+    QCoreApplication app(argc, argv);
+
+    const QString appName = QLatin1String("disconnectduringreadtest-") + 
QCoreApplication::arguments().value(1);
+
+    KDSingleApplication kdsa(appName);
+
+    if (kdsa.isPrimaryInstance()) {
+        std::cout << "Primary" << std::endl;
+
+        QObject::connect(&kdsa, &KDSingleApplication::messageReceived, qApp,
+                         [](const QByteArray &message) {
+                             // Spin the event loop, simulating what 
QMessageBox::information() does.
+                             // This causes the socket's disconnected signal 
to be processed
+                             // while we're still inside 
readDataFromSecondarySocket(),
+                             // leading to a use-after-free crash.
+                             QCoreApplication::processEvents();
+
+                             std::cout << "MESSAGE: >" << message.constData() 
<< '<' << std::endl;
+                             qApp->quit();
+                         });
+
+        QTimer::singleShot(std::chrono::seconds(5), qApp, [] { qApp->exit(1); 
});
+        return QCoreApplication::exec();
+    }
+
+    std::cout << "Secondary" << std::endl;
+
+    if (!kdsa.sendMessage(QCoreApplication::arguments().value(2).toUtf8())) {
+        std::cerr << "Unable to send message to the primary!" << '\n';
+        return 1;
+    }
+
+    return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/KDSingleApplication-1.2.0/tests/auto/disconnectduringreadtest/test/CMakeLists.txt
 
new/KDSingleApplication-1.2.1/tests/auto/disconnectduringreadtest/test/CMakeLists.txt
--- 
old/KDSingleApplication-1.2.0/tests/auto/disconnectduringreadtest/test/CMakeLists.txt
       1970-01-01 01:00:00.000000000 +0100
+++ 
new/KDSingleApplication-1.2.1/tests/auto/disconnectduringreadtest/test/CMakeLists.txt
       2026-04-22 14:08:26.000000000 +0200
@@ -0,0 +1,20 @@
+# This file is part of KDSingleApplication.
+#
+# SPDX-FileCopyrightText: 2026 Klarälvdalens Datakonsult AB, a KDAB Group 
company <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+# Contact KDAB at <[email protected]> for commercial licensing options.
+#
+
+include_directories(${CMAKE_SOURCE_DIR}/src)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+add_executable(
+    tst_disconnectduringreadtest
+    ../tst_disconnectduringreadtest.cpp
+)
+target_link_libraries(
+    tst_disconnectduringreadtest Qt::Test
+)
+add_test(NAME tst_disconnectduringreadtest COMMAND 
tst_disconnectduringreadtest)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/KDSingleApplication-1.2.0/tests/auto/disconnectduringreadtest/tst_disconnectduringreadtest.cpp
 
new/KDSingleApplication-1.2.1/tests/auto/disconnectduringreadtest/tst_disconnectduringreadtest.cpp
--- 
old/KDSingleApplication-1.2.0/tests/auto/disconnectduringreadtest/tst_disconnectduringreadtest.cpp
  1970-01-01 01:00:00.000000000 +0100
+++ 
new/KDSingleApplication-1.2.1/tests/auto/disconnectduringreadtest/tst_disconnectduringreadtest.cpp
  2026-04-22 14:08:26.000000000 +0200
@@ -0,0 +1,86 @@
+/*
+  This file is part of KDSingleApplication.
+
+  SPDX-FileCopyrightText: 2026 Klarälvdalens Datakonsult AB, a KDAB Group 
company <[email protected]>
+
+  SPDX-License-Identifier: MIT
+
+  Contact KDAB at <[email protected]> for commercial licensing options.
+*/
+
+#include <QtCore/QProcess>
+#include <QtCore/QRandomGenerator>
+#include <QtTest/QTest>
+
+
+// Tests that processing events inside a messageReceived handler
+// (e.g. showing a QMessageBox) does not crash when the secondary
+// disconnects while the readyRead handler is still on the stack.
+
+class tst_DisconnectDuringReadTest : public QObject
+{
+    Q_OBJECT
+private Q_SLOTS:
+    void testDisconnectDuringRead();
+};
+
+void tst_DisconnectDuringReadTest::testDisconnectDuringRead()
+{
+#ifdef KDSINGLEAPPLICATION_BINARY_DIR
+    const QString executable = QStringLiteral(KDSINGLEAPPLICATION_BINARY_DIR 
"disconnectduringreadtest");
+#else
+    const QString executable = 
QStringLiteral("disconnectduringreadtest/disconnectduringreadtest");
+#endif
+    QByteArray output;
+    bool ok;
+
+    const QString testId = 
QString::number(QRandomGenerator::global()->generate());
+    const QString message = QStringLiteral("Hello");
+
+    QProcess primary;
+    primary.setProcessChannelMode(QProcess::ForwardedErrorChannel);
+    primary.start(executable, { testId });
+    QVERIFY(primary.waitForStarted());
+    QCOMPARE(primary.state(), QProcess::Running);
+    output.clear();
+    ok = QTest::qWaitFor([&]() {
+        output += primary.readAllStandardOutput();
+        return output == "Primary\n";
+    });
+    QVERIFY(ok);
+
+    QProcess secondary;
+    secondary.setProcessChannelMode(QProcess::ForwardedErrorChannel);
+    secondary.start(executable, { testId, message });
+    QVERIFY(secondary.waitForStarted());
+    QCOMPARE(secondary.state(), QProcess::Running);
+
+    output.clear();
+    ok = QTest::qWaitFor([&]() {
+        output += secondary.readAllStandardOutput();
+        return output == "Secondary\n";
+    });
+    QVERIFY(ok);
+
+    if (secondary.state() != QProcess::NotRunning)
+        QVERIFY(secondary.waitForFinished());
+    QCOMPARE(secondary.exitCode(), 0);
+    QCOMPARE(secondary.exitStatus(), QProcess::NormalExit);
+
+    output.clear();
+    const QByteArray expected = "MESSAGE: >" + message.toUtf8() + "<\n";
+    ok = QTest::qWaitFor([&]() {
+        output += primary.readAllStandardOutput();
+        return output == expected;
+    });
+    QVERIFY2(ok, "Primary instance likely crashed before printing the 
message");
+
+    if (primary.state() != QProcess::NotRunning)
+        QVERIFY(primary.waitForFinished());
+    QCOMPARE(primary.exitCode(), 0);
+    QCOMPARE(primary.exitStatus(), QProcess::NormalExit);
+}
+
+QTEST_MAIN(tst_DisconnectDuringReadTest)
+
+#include "tst_disconnectduringreadtest.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/KDSingleApplication-1.2.0/version.txt 
new/KDSingleApplication-1.2.1/version.txt
--- old/KDSingleApplication-1.2.0/version.txt   2025-05-26 11:10:08.000000000 
+0200
+++ new/KDSingleApplication-1.2.1/version.txt   2026-04-22 14:08:26.000000000 
+0200
@@ -1 +1 @@
-1.2.0
+1.2.1

Reply via email to