From ee99dd959c471bd1497d2d50b1e9d1af86d3f8d3 Mon Sep 17 00:00:00 2001 From: Jay Two Date: Fri, 12 Mar 2021 21:00:53 +0900 Subject: [PATCH 1/2] update github actions --- .github/workflows/android.yml | 10 +++++----- .github/workflows/ios.yml | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 8ec85150..39e9ff43 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -33,18 +33,18 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] - qt_ver: [5.12.6] + os: [ubuntu-20.04] + qt_ver: [5.12.10] qt_target: [android] - qt_arch: [android_x86,android_armv7] + qt_arch: [android_x86,android_armv7,android_arm64_v8a] steps: - name: Install Qt - uses: jurplel/install-qt-action@v2 + uses: jurplel/install-qt-action@v2.10.0 with: version: ${{ matrix.qt_ver }} target: ${{ matrix.qt_target }} arch: ${{ matrix.qt_arch }} - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 with: fetch-depth: 1 - name: build android diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index cfc51958..338da2e5 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -33,16 +33,16 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest] - qt_ver: [5.12.6] + os: [macos-10.15] + qt_ver: [5.12.10,5.15.2] qt_target: [ios] steps: - name: Install Qt - uses: jurplel/install-qt-action@v2 + uses: jurplel/install-qt-action@v2.10.0 with: version: ${{ matrix.qt_ver }} target: ${{ matrix.qt_target }} - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 with: fetch-depth: 1 - name: build ios From e67147ea36d2e05636025a72d861d93eeb82b8db Mon Sep 17 00:00:00 2001 From: Jay Two Date: Sat, 13 Mar 2021 19:25:05 +0900 Subject: [PATCH 2/2] update webserver example for qt6 --- WebServer/WebServer.pro | 4 ---- WebServer/context.hpp | 4 ---- WebServer/main.cpp | 4 ---- WebServer/recurse.hpp | 12 +++++++++++- WebServer/request.hpp | 2 +- WebServer/response.hpp | 4 ---- 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/WebServer/WebServer.pro b/WebServer/WebServer.pro index 07fa2c22..ce28918b 100644 --- a/WebServer/WebServer.pro +++ b/WebServer/WebServer.pro @@ -3,10 +3,6 @@ TARGET = WebServer TEMPLATE = app -equals( QT_MAJOR_VERSION, 6 ) { - QT += core5compat -} - QT += core QT += network QT -= gui diff --git a/WebServer/context.hpp b/WebServer/context.hpp index 33aa27a4..ea4ad201 100644 --- a/WebServer/context.hpp +++ b/WebServer/context.hpp @@ -5,10 +5,6 @@ #include #include -#if QT_VERSION_MAJOR >= 6 // Qt6 or higher version -#include -#endif - #include "request.hpp" #include "response.hpp" diff --git a/WebServer/main.cpp b/WebServer/main.cpp index bd118d12..6869e797 100644 --- a/WebServer/main.cpp +++ b/WebServer/main.cpp @@ -7,10 +7,6 @@ #include #include -#if QT_VERSION_MAJOR >= 6 // Qt6 or higher version -#include -#endif - #include "recurse.hpp" #include "xlsxdocument.h" diff --git a/WebServer/recurse.hpp b/WebServer/recurse.hpp index dcdac1c1..593c8e21 100644 --- a/WebServer/recurse.hpp +++ b/WebServer/recurse.hpp @@ -18,7 +18,8 @@ #include #if QT_VERSION_MAJOR >= 6 // Qt6 or higher version -#include + #include + #include #endif #include @@ -439,10 +440,19 @@ namespace Recurse { QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); +#if QT_VERSION_MAJOR >= 6 // Qt6 or higher version + QRegularExpression debug_strings("(recurse|development)"); + + QRegularExpressionMatch rem = debug_strings.match(env.value("DEBUG")); + if ( rem.hasMatch() ) + m_debug = true; +#else QRegExp debug_strings("(recurse|development)"); if (debug_strings.indexIn(env.value("DEBUG")) != -1) m_debug = true; +#endif + } inline Application::Application(int &argc, char **argv, QObject *parent) diff --git a/WebServer/request.hpp b/WebServer/request.hpp index 47b995b5..ea321b16 100644 --- a/WebServer/request.hpp +++ b/WebServer/request.hpp @@ -8,7 +8,7 @@ #include #if QT_VERSION_MAJOR >= 6 // Qt6 or higher version -#include + #include #endif class Request diff --git a/WebServer/response.hpp b/WebServer/response.hpp index b742df96..1332dc9c 100644 --- a/WebServer/response.hpp +++ b/WebServer/response.hpp @@ -5,10 +5,6 @@ #include #include -#if QT_VERSION_MAJOR >= 6 // Qt6 or higher version -#include -#endif - #include class Response