diff --git a/.github/workflows/cmake_build.yml b/.github/workflows/cmake_build.yml index 21c83edd4..05eea3d62 100644 --- a/.github/workflows/cmake_build.yml +++ b/.github/workflows/cmake_build.yml @@ -21,7 +21,9 @@ jobs: toolchain: - linux-gcc - macos-clang - - windows-msvc + - windows-msvc-qt5 + - windows-msvc-qt6 + - windows-msvc-static configuration: - Release @@ -41,20 +43,31 @@ jobs: modules: "" use_qt6: "ON" - - toolchain: windows-msvc + - toolchain: windows-msvc-qt5 os: windows-latest compiler: msvc qt_version: "5.15.2" modules: "" use_qt6: "OFF" - - toolchain: windows-msvc + - toolchain: windows-msvc-qt6 os: windows-latest compiler: msvc qt_version: "6.9.2" modules: "qt5compat" use_qt6: "ON" + # Static library. One job is enough: the tests link it and see the + # NODE_EDITOR_STATIC define, so the examples are skipped to save time. + - toolchain: windows-msvc-static + os: windows-latest + compiler: msvc + qt_version: "6.9.2" + modules: "qt5compat" + use_qt6: "ON" + shared: "OFF" + examples: "OFF" + steps: - name: Checkout Code uses: actions/checkout@v2 @@ -80,7 +93,7 @@ jobs: arch: x64 - name: Configure (${{ matrix.configuration }}) - run: cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DBUILD_DOCS=OFF -DUSE_QT6=${{ matrix.use_qt6 }} + run: cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DBUILD_DOCS=OFF -DUSE_QT6=${{ matrix.use_qt6 }} -DBUILD_SHARED_LIBS=${{ matrix.shared || 'ON' }} -DBUILD_EXAMPLES=${{ matrix.examples || 'ON' }} - name: Build with ${{ matrix.compiler }} run: cmake --build build --config ${{ matrix.configuration }} diff --git a/examples/calculator/LongProcessingRandomNumber.hpp b/examples/calculator/LongProcessingRandomNumber.hpp index 04275dbef..d359db115 100644 --- a/examples/calculator/LongProcessingRandomNumber.hpp +++ b/examples/calculator/LongProcessingRandomNumber.hpp @@ -86,7 +86,7 @@ class LongProcessingRandomNumber : public MathOperationDataModel Q_EMIT computingStarted(); PortIndex const outPortIndex = 0; - QTimer::singleShot(_totalDurationMs, this, [this, n1, n2]() { + QTimer::singleShot(_totalDurationMs, this, [this, n1, n2, outPortIndex]() { if (n1 && n2) { double a = n1->number(); double b = n2->number(); diff --git a/examples/custom_painter/CustomConnectionPainter.cpp b/examples/custom_painter/CustomConnectionPainter.cpp index f30170872..e377f0666 100644 --- a/examples/custom_painter/CustomConnectionPainter.cpp +++ b/examples/custom_painter/CustomConnectionPainter.cpp @@ -99,7 +99,8 @@ void CustomConnectionPainter::drawArrow(QPainter *painter, QPointF const &tip, Q // Arrow parameters qreal arrowSize = 10.0; - qreal arrowAngle = M_PI / 6.0; // 30 degrees + constexpr qreal pi = 3.14159265358979323846; + qreal arrowAngle = pi / 6.0; // 30 degrees // Calculate arrow points QPointF arrowP1 = tip