summary refs log tree commit diff
path: root/third_party
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-12-15 15:20:04 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-12-15 15:20:04 +0100
commit57d1dffdbd453af572d1460495edd81427bc2b04 (patch)
tree8deb94ba6a52200c1ea7e44c8f095874e873b17a /third_party
parentUse icns on macOS (diff)
downloadnheko-57d1dffdbd453af572d1460495edd81427bc2b04.tar.xz
Update to SingleApplication 3.3.2 proper
Diffstat (limited to 'third_party')
-rw-r--r--third_party/SingleApplication-3.3.0/.github/workflows/build-cmake.yml56
-rw-r--r--third_party/SingleApplication-3.3.2/.github/FUNDING.yml (renamed from third_party/SingleApplication-3.3.0/.github/FUNDING.yml)0
-rw-r--r--third_party/SingleApplication-3.3.2/.github/workflows/build.yml87
-rw-r--r--third_party/SingleApplication-3.3.2/.gitignore (renamed from third_party/SingleApplication-3.3.0/.gitignore)0
-rw-r--r--third_party/SingleApplication-3.3.2/CHANGELOG.md (renamed from third_party/SingleApplication-3.3.0/CHANGELOG.md)11
-rw-r--r--third_party/SingleApplication-3.3.2/CMakeLists.txt (renamed from third_party/SingleApplication-3.3.0/CMakeLists.txt)0
-rw-r--r--third_party/SingleApplication-3.3.2/LICENSE (renamed from third_party/SingleApplication-3.3.0/LICENSE)0
-rw-r--r--third_party/SingleApplication-3.3.2/README.md (renamed from third_party/SingleApplication-3.3.0/README.md)3
-rw-r--r--third_party/SingleApplication-3.3.2/SingleApplication (renamed from third_party/SingleApplication-3.3.0/SingleApplication)0
-rw-r--r--third_party/SingleApplication-3.3.2/Windows.md (renamed from third_party/SingleApplication-3.3.0/Windows.md)0
-rw-r--r--third_party/SingleApplication-3.3.2/examples/basic/CMakeLists.txt (renamed from third_party/SingleApplication-3.3.0/examples/basic/CMakeLists.txt)0
-rwxr-xr-xthird_party/SingleApplication-3.3.2/examples/basic/basic.pro (renamed from third_party/SingleApplication-3.3.0/examples/basic/basic.pro)0
-rwxr-xr-xthird_party/SingleApplication-3.3.2/examples/basic/main.cpp (renamed from third_party/SingleApplication-3.3.0/examples/basic/main.cpp)0
-rw-r--r--third_party/SingleApplication-3.3.2/examples/calculator/CMakeLists.txt (renamed from third_party/SingleApplication-3.3.0/examples/calculator/CMakeLists.txt)0
-rw-r--r--third_party/SingleApplication-3.3.2/examples/calculator/button.cpp (renamed from third_party/SingleApplication-3.3.0/examples/calculator/button.cpp)0
-rw-r--r--third_party/SingleApplication-3.3.2/examples/calculator/button.h (renamed from third_party/SingleApplication-3.3.0/examples/calculator/button.h)0
-rw-r--r--third_party/SingleApplication-3.3.2/examples/calculator/calculator.cpp (renamed from third_party/SingleApplication-3.3.0/examples/calculator/calculator.cpp)0
-rw-r--r--third_party/SingleApplication-3.3.2/examples/calculator/calculator.h (renamed from third_party/SingleApplication-3.3.0/examples/calculator/calculator.h)0
-rw-r--r--third_party/SingleApplication-3.3.2/examples/calculator/calculator.pro (renamed from third_party/SingleApplication-3.3.0/examples/calculator/calculator.pro)0
-rw-r--r--third_party/SingleApplication-3.3.2/examples/calculator/main.cpp (renamed from third_party/SingleApplication-3.3.0/examples/calculator/main.cpp)0
-rw-r--r--third_party/SingleApplication-3.3.2/examples/sending_arguments/CMakeLists.txt (renamed from third_party/SingleApplication-3.3.0/examples/sending_arguments/CMakeLists.txt)0
-rwxr-xr-xthird_party/SingleApplication-3.3.2/examples/sending_arguments/main.cpp (renamed from third_party/SingleApplication-3.3.0/examples/sending_arguments/main.cpp)0
-rw-r--r--third_party/SingleApplication-3.3.2/examples/sending_arguments/messagereceiver.cpp (renamed from third_party/SingleApplication-3.3.0/examples/sending_arguments/messagereceiver.cpp)0
-rw-r--r--third_party/SingleApplication-3.3.2/examples/sending_arguments/messagereceiver.h (renamed from third_party/SingleApplication-3.3.0/examples/sending_arguments/messagereceiver.h)0
-rwxr-xr-xthird_party/SingleApplication-3.3.2/examples/sending_arguments/sending_arguments.pro (renamed from third_party/SingleApplication-3.3.0/examples/sending_arguments/sending_arguments.pro)0
-rw-r--r--third_party/SingleApplication-3.3.2/singleapplication.cpp (renamed from third_party/SingleApplication-3.3.0/singleapplication.cpp)0
-rw-r--r--third_party/SingleApplication-3.3.2/singleapplication.h (renamed from third_party/SingleApplication-3.3.0/singleapplication.h)0
-rw-r--r--third_party/SingleApplication-3.3.2/singleapplication.pri (renamed from third_party/SingleApplication-3.3.0/singleapplication.pri)0
-rw-r--r--third_party/SingleApplication-3.3.2/singleapplication_p.cpp (renamed from third_party/SingleApplication-3.3.0/singleapplication_p.cpp)15
-rw-r--r--third_party/SingleApplication-3.3.2/singleapplication_p.h (renamed from third_party/SingleApplication-3.3.0/singleapplication_p.h)0
30 files changed, 111 insertions, 61 deletions
diff --git a/third_party/SingleApplication-3.3.0/.github/workflows/build-cmake.yml b/third_party/SingleApplication-3.3.0/.github/workflows/build-cmake.yml
deleted file mode 100644
index 6344b504..00000000
--- a/third_party/SingleApplication-3.3.0/.github/workflows/build-cmake.yml
+++ /dev/null
@@ -1,56 +0,0 @@
-name: "CI: Build Test"
-
-on: [push, pull_request]
-
-jobs:
-  build:
-
-    strategy:
-      matrix:
-        qt_version: [5.12.6, 5.13.2, 5.14.0, 5.15.0, 6.0.0]
-        platform: [ubuntu-20.04, windows-latest, macos-latest]
-        include:
-          - qt_version: 6.0.0
-            additional_arguments: -D QT_DEFAULT_MAJOR_VERSION=6
-          - platform: ubuntu-20.04
-            CXXFLAGS: -Wall -Wextra -pedantic -Werror
-          - platform: macos-latest
-            CXXFLAGS: -Wall -Wextra -pedantic -Werror
-          - platform: windows-latest
-            CXXFLAGS: /W4 /WX
-
-    runs-on: ${{ matrix.platform }}
-    env:
-      CXXFLAGS: ${{ matrix.CXXFLAGS }}
-
-    steps:
-    - uses: actions/checkout@v2.3.4
-
-    - name: Install Qt
-      uses: jurplel/install-qt-action@v2.11.1
-      with:
-        version: ${{ matrix.qt_version }}
-
-    - name: cmake
-      run: cmake . ${{ matrix.additional_arguments }}
-
-    - name: cmake build
-      run: cmake --build .
-
-    - name: Build example - basic (cmake)
-      working-directory: examples/basic/
-      run: |
-        cmake . ${{ matrix.additional_arguments }}
-        cmake --build .
-
-    - name: Build example - calculator (cmake)
-      working-directory: examples/calculator/
-      run: |
-        cmake . ${{ matrix.additional_arguments }}
-        cmake --build .
-
-    - name: Build example - sending_arguments (cmake)
-      working-directory: examples/sending_arguments/
-      run: |
-        cmake . ${{ matrix.additional_arguments }}
-        cmake --build .
diff --git a/third_party/SingleApplication-3.3.0/.github/FUNDING.yml b/third_party/SingleApplication-3.3.2/.github/FUNDING.yml
index 3ca4d97a..3ca4d97a 100644
--- a/third_party/SingleApplication-3.3.0/.github/FUNDING.yml
+++ b/third_party/SingleApplication-3.3.2/.github/FUNDING.yml
diff --git a/third_party/SingleApplication-3.3.2/.github/workflows/build.yml b/third_party/SingleApplication-3.3.2/.github/workflows/build.yml
new file mode 100644
index 00000000..ffc37f41
--- /dev/null
+++ b/third_party/SingleApplication-3.3.2/.github/workflows/build.yml
@@ -0,0 +1,87 @@
+name: "CI: Build Test"
+
+on:
+  push:
+    branches-ignore:
+      - "releases/**"
+    paths-ignore:
+      - "**.md"
+
+jobs:
+  build:
+    strategy:
+      matrix:
+        qt_version: [5.12.6, 5.13.2, 5.14.0, 5.15.0, 6.0.0]
+        platform: [ubuntu-20.04, windows-latest, macos-latest]
+        include:
+          - qt_version: 6.0.0
+            additional_arguments: -D QT_DEFAULT_MAJOR_VERSION=6
+          - platform: ubuntu-20.04
+            make: make
+            CXXFLAGS: -Wall -Wextra -pedantic -Werror
+            MAKEFLAGS: -j2
+          - platform: macos-latest
+            make: make
+            CXXFLAGS: -Wall -Wextra -pedantic -Werror
+            MAKEFLAGS: -j3
+          - platform: windows-latest
+            make: nmake
+            CXXFLAGS: /W4 /WX /MP
+
+    runs-on: ${{ matrix.platform }}
+    env:
+      CXXFLAGS: ${{ matrix.CXXFLAGS }}
+      MAKEFLAGS: ${{ matrix.MAKEFLAGS }}
+
+    steps:
+      - name: Clone repo
+        uses: actions/checkout@v2.3.4
+
+      - name: Install Qt
+        uses: jurplel/install-qt-action@v2.14.0
+        with:
+          version: ${{ matrix.qt_version }}
+
+      - name: Build library with CMake
+        run: |
+          cmake . ${{ matrix.additional_arguments }}
+          cmake --build .
+
+      - name: Build basic example with CMake
+        working-directory: examples/basic/
+        run: |
+          cmake . ${{ matrix.additional_arguments }}
+          cmake --build .
+
+      - name: Build calculator example CMake
+        working-directory: examples/calculator/
+        run: |
+          cmake . ${{ matrix.additional_arguments }}
+          cmake --build .
+
+      - name: Build sending_arguments example with CMake
+        working-directory: examples/sending_arguments/
+        run: |
+          cmake . ${{ matrix.additional_arguments }}
+          cmake --build .
+
+      - name: Setup MSVC environment for QMake
+        uses: ilammy/msvc-dev-cmd@v1
+
+      - name: Build basic example with QMake
+        working-directory: examples/basic/
+        run: |
+          qmake
+          ${{ matrix.make }}
+
+      - name: Build calculator example QMake
+        working-directory: examples/calculator/
+        run: |
+          qmake
+          ${{ matrix.make }}
+
+      - name: Build sending_arguments example with QMake
+        working-directory: examples/sending_arguments/
+        run: |
+          qmake
+          ${{ matrix.make }}
diff --git a/third_party/SingleApplication-3.3.0/.gitignore b/third_party/SingleApplication-3.3.2/.gitignore
index 35533fe8..35533fe8 100644
--- a/third_party/SingleApplication-3.3.0/.gitignore
+++ b/third_party/SingleApplication-3.3.2/.gitignore
diff --git a/third_party/SingleApplication-3.3.0/CHANGELOG.md b/third_party/SingleApplication-3.3.2/CHANGELOG.md
index 51669b90..348ca26d 100644
--- a/third_party/SingleApplication-3.3.0/CHANGELOG.md
+++ b/third_party/SingleApplication-3.3.2/CHANGELOG.md
@@ -3,11 +3,20 @@ Changelog
 
 If by accident I have forgotten to credit someone in the CHANGELOG, email me and I will fix it.
 
+__3.3.2__
+---------
+
+* Fixed crash caused by sending a `writeAck` on a removed connection. - _Nicolas Werner_
+
+__3.3.1__
+---------
+
+* Added support for _AppImage_ dynamic executable paths. - _Michael Klein_
 
 __3.3.0__
 ---------
 
-* Fixed message fragmentation issue causing crashes and incorrectly and inconsistently received messages. - _Nils Jeisecke_
+* Fixed message fragmentation issue causing crashes and incorrectly / inconsistently received messages. - _Nils Jeisecke_
 
 __3.2.0__
 ---------
diff --git a/third_party/SingleApplication-3.3.0/CMakeLists.txt b/third_party/SingleApplication-3.3.2/CMakeLists.txt
index ae1b1439..ae1b1439 100644
--- a/third_party/SingleApplication-3.3.0/CMakeLists.txt
+++ b/third_party/SingleApplication-3.3.2/CMakeLists.txt
diff --git a/third_party/SingleApplication-3.3.0/LICENSE b/third_party/SingleApplication-3.3.2/LICENSE
index a82e5a68..a82e5a68 100644
--- a/third_party/SingleApplication-3.3.0/LICENSE
+++ b/third_party/SingleApplication-3.3.2/LICENSE
diff --git a/third_party/SingleApplication-3.3.0/README.md b/third_party/SingleApplication-3.3.2/README.md
index 457ab339..a76bada3 100644
--- a/third_party/SingleApplication-3.3.0/README.md
+++ b/third_party/SingleApplication-3.3.2/README.md
@@ -182,7 +182,8 @@ bool SingleApplication::sendMessage( QByteArray message, int timeout = 100 )
 ```
 
 Sends `message` to the Primary Instance. Uses `timeout` as a the maximum timeout
-in milliseconds for blocking functions
+in milliseconds for blocking functions. Returns `true` if the message has been sent
+successfully. If the message can't be sent or the function timeouts - returns `false`.
 
 ---
 
diff --git a/third_party/SingleApplication-3.3.0/SingleApplication b/third_party/SingleApplication-3.3.2/SingleApplication
index 8ead1a42..8ead1a42 100644
--- a/third_party/SingleApplication-3.3.0/SingleApplication
+++ b/third_party/SingleApplication-3.3.2/SingleApplication
diff --git a/third_party/SingleApplication-3.3.0/Windows.md b/third_party/SingleApplication-3.3.2/Windows.md
index 13c52da0..13c52da0 100644
--- a/third_party/SingleApplication-3.3.0/Windows.md
+++ b/third_party/SingleApplication-3.3.2/Windows.md
diff --git a/third_party/SingleApplication-3.3.0/examples/basic/CMakeLists.txt b/third_party/SingleApplication-3.3.2/examples/basic/CMakeLists.txt
index c1429230..c1429230 100644
--- a/third_party/SingleApplication-3.3.0/examples/basic/CMakeLists.txt
+++ b/third_party/SingleApplication-3.3.2/examples/basic/CMakeLists.txt
diff --git a/third_party/SingleApplication-3.3.0/examples/basic/basic.pro b/third_party/SingleApplication-3.3.2/examples/basic/basic.pro
index b7af16cf..b7af16cf 100755
--- a/third_party/SingleApplication-3.3.0/examples/basic/basic.pro
+++ b/third_party/SingleApplication-3.3.2/examples/basic/basic.pro
diff --git a/third_party/SingleApplication-3.3.0/examples/basic/main.cpp b/third_party/SingleApplication-3.3.2/examples/basic/main.cpp
index b2092c6d..b2092c6d 100755
--- a/third_party/SingleApplication-3.3.0/examples/basic/main.cpp
+++ b/third_party/SingleApplication-3.3.2/examples/basic/main.cpp
diff --git a/third_party/SingleApplication-3.3.0/examples/calculator/CMakeLists.txt b/third_party/SingleApplication-3.3.2/examples/calculator/CMakeLists.txt
index 82305f04..82305f04 100644
--- a/third_party/SingleApplication-3.3.0/examples/calculator/CMakeLists.txt
+++ b/third_party/SingleApplication-3.3.2/examples/calculator/CMakeLists.txt
diff --git a/third_party/SingleApplication-3.3.0/examples/calculator/button.cpp b/third_party/SingleApplication-3.3.2/examples/calculator/button.cpp
index d6cca0a0..d6cca0a0 100644
--- a/third_party/SingleApplication-3.3.0/examples/calculator/button.cpp
+++ b/third_party/SingleApplication-3.3.2/examples/calculator/button.cpp
diff --git a/third_party/SingleApplication-3.3.0/examples/calculator/button.h b/third_party/SingleApplication-3.3.2/examples/calculator/button.h
index 2c014c7b..2c014c7b 100644
--- a/third_party/SingleApplication-3.3.0/examples/calculator/button.h
+++ b/third_party/SingleApplication-3.3.2/examples/calculator/button.h
diff --git a/third_party/SingleApplication-3.3.0/examples/calculator/calculator.cpp b/third_party/SingleApplication-3.3.2/examples/calculator/calculator.cpp
index 3d34c2a7..3d34c2a7 100644
--- a/third_party/SingleApplication-3.3.0/examples/calculator/calculator.cpp
+++ b/third_party/SingleApplication-3.3.2/examples/calculator/calculator.cpp
diff --git a/third_party/SingleApplication-3.3.0/examples/calculator/calculator.h b/third_party/SingleApplication-3.3.2/examples/calculator/calculator.h
index 250a2f3e..250a2f3e 100644
--- a/third_party/SingleApplication-3.3.0/examples/calculator/calculator.h
+++ b/third_party/SingleApplication-3.3.2/examples/calculator/calculator.h
diff --git a/third_party/SingleApplication-3.3.0/examples/calculator/calculator.pro b/third_party/SingleApplication-3.3.2/examples/calculator/calculator.pro
index 8f132609..8f132609 100644
--- a/third_party/SingleApplication-3.3.0/examples/calculator/calculator.pro
+++ b/third_party/SingleApplication-3.3.2/examples/calculator/calculator.pro
diff --git a/third_party/SingleApplication-3.3.0/examples/calculator/main.cpp b/third_party/SingleApplication-3.3.2/examples/calculator/main.cpp
index d45438f4..d45438f4 100644
--- a/third_party/SingleApplication-3.3.0/examples/calculator/main.cpp
+++ b/third_party/SingleApplication-3.3.2/examples/calculator/main.cpp
diff --git a/third_party/SingleApplication-3.3.0/examples/sending_arguments/CMakeLists.txt b/third_party/SingleApplication-3.3.2/examples/sending_arguments/CMakeLists.txt
index 2cc55975..2cc55975 100644
--- a/third_party/SingleApplication-3.3.0/examples/sending_arguments/CMakeLists.txt
+++ b/third_party/SingleApplication-3.3.2/examples/sending_arguments/CMakeLists.txt
diff --git a/third_party/SingleApplication-3.3.0/examples/sending_arguments/main.cpp b/third_party/SingleApplication-3.3.2/examples/sending_arguments/main.cpp
index a9d34dd9..a9d34dd9 100755
--- a/third_party/SingleApplication-3.3.0/examples/sending_arguments/main.cpp
+++ b/third_party/SingleApplication-3.3.2/examples/sending_arguments/main.cpp
diff --git a/third_party/SingleApplication-3.3.0/examples/sending_arguments/messagereceiver.cpp b/third_party/SingleApplication-3.3.2/examples/sending_arguments/messagereceiver.cpp
index 0560b072..0560b072 100644
--- a/third_party/SingleApplication-3.3.0/examples/sending_arguments/messagereceiver.cpp
+++ b/third_party/SingleApplication-3.3.2/examples/sending_arguments/messagereceiver.cpp
diff --git a/third_party/SingleApplication-3.3.0/examples/sending_arguments/messagereceiver.h b/third_party/SingleApplication-3.3.2/examples/sending_arguments/messagereceiver.h
index 50a970c8..50a970c8 100644
--- a/third_party/SingleApplication-3.3.0/examples/sending_arguments/messagereceiver.h
+++ b/third_party/SingleApplication-3.3.2/examples/sending_arguments/messagereceiver.h
diff --git a/third_party/SingleApplication-3.3.0/examples/sending_arguments/sending_arguments.pro b/third_party/SingleApplication-3.3.2/examples/sending_arguments/sending_arguments.pro
index 897636a9..897636a9 100755
--- a/third_party/SingleApplication-3.3.0/examples/sending_arguments/sending_arguments.pro
+++ b/third_party/SingleApplication-3.3.2/examples/sending_arguments/sending_arguments.pro
diff --git a/third_party/SingleApplication-3.3.0/singleapplication.cpp b/third_party/SingleApplication-3.3.2/singleapplication.cpp
index 09e264ef..09e264ef 100644
--- a/third_party/SingleApplication-3.3.0/singleapplication.cpp
+++ b/third_party/SingleApplication-3.3.2/singleapplication.cpp
diff --git a/third_party/SingleApplication-3.3.0/singleapplication.h b/third_party/SingleApplication-3.3.2/singleapplication.h
index 91cabf93..91cabf93 100644
--- a/third_party/SingleApplication-3.3.0/singleapplication.h
+++ b/third_party/SingleApplication-3.3.2/singleapplication.h
diff --git a/third_party/SingleApplication-3.3.0/singleapplication.pri b/third_party/SingleApplication-3.3.2/singleapplication.pri
index ae81f599..ae81f599 100644
--- a/third_party/SingleApplication-3.3.0/singleapplication.pri
+++ b/third_party/SingleApplication-3.3.2/singleapplication.pri
diff --git a/third_party/SingleApplication-3.3.0/singleapplication_p.cpp b/third_party/SingleApplication-3.3.2/singleapplication_p.cpp
index 4069ef78..6702b943 100644
--- a/third_party/SingleApplication-3.3.0/singleapplication_p.cpp
+++ b/third_party/SingleApplication-3.3.2/singleapplication_p.cpp
@@ -144,8 +144,17 @@ void SingleApplicationPrivate::genBlockServerName()
     }
 
     if( ! (options & SingleApplication::Mode::ExcludeAppPath) ){
-#ifdef Q_OS_WIN
+#if defined(Q_OS_WIN)
         appData.addData( SingleApplication::app_t::applicationFilePath().toLower().toUtf8() );
+#elif defined(Q_OS_LINUX)
+        // If the application is running as an AppImage then the APPIMAGE env var should be used
+        // instead of applicationPath() as each instance is launched with its own executable path
+        const QByteArray appImagePath = qgetenv( "APPIMAGE" );
+        if( appImagePath.isEmpty() ){ // Not running as AppImage: use path to executable file
+            appData.addData( SingleApplication::app_t::applicationFilePath().toUtf8() );
+        } else { // Running as AppImage: Use absolute path to AppImage file
+            appData.addData( appImagePath );
+        };
 #else
         appData.addData( SingleApplication::app_t::applicationFilePath().toUtf8() );
 #endif
@@ -494,14 +503,14 @@ void SingleApplicationPrivate::slotDataAvailable( QLocalSocket *dataSocket, quin
     if ( !isFrameComplete( dataSocket ) )
         return;
 
-    auto message = dataSocket->readAll();
+    const QByteArray message = dataSocket->readAll();
 
     writeAck( dataSocket );
 
     ConnectionInfo &info = connectionMap[dataSocket];
     info.stage = StageConnectedHeader;
 
-    Q_EMIT q->receivedMessage(instanceId, message);
+    Q_EMIT q->receivedMessage( instanceId, message);
 }
 
 void SingleApplicationPrivate::slotClientConnectionClosed( QLocalSocket *closedSocket, quint32 instanceId )
diff --git a/third_party/SingleApplication-3.3.0/singleapplication_p.h b/third_party/SingleApplication-3.3.2/singleapplication_p.h
index 58507cf3..58507cf3 100644
--- a/third_party/SingleApplication-3.3.0/singleapplication_p.h
+++ b/third_party/SingleApplication-3.3.2/singleapplication_p.h