Compare commits

...

4 Commits
4.1 ... master

Author SHA1 Message Date
b53d8f3df7 Update the nuber of cores acording to the latest GitHub runners state 2025-03-21 06:30:23 +01:00
da62d0ba63 Use Qt 6.8.2 for OS X builds 2025-02-19 00:48:22 +01:00
baff6ac17d Remove all Qt5 < 5.15 workarounds.
Qt 5.15 is now the minimal required Qt version.
2025-02-19 00:44:36 +01:00
56e83ea6d9 Version++ 2025-02-19 00:44:06 +01:00
7 changed files with 19 additions and 23 deletions

View File

@ -1,4 +1,4 @@
version: 4.1.{build} version: 4.2.{build}
configuration: configuration:
- Release - Release

View File

@ -40,7 +40,7 @@ jobs:
- name: Configure build - name: Configure build
run: qmake pbfplugin.pro run: qmake pbfplugin.pro
- name: Build project - name: Build project
run: make -j2 run: make -j4
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:

View File

@ -8,7 +8,10 @@ on:
jobs: jobs:
build: build:
name: QtPBFImagePlugin name: QtPBFImagePlugin
runs-on: ubuntu-20.04 runs-on: ubuntu-22.04
strategy:
matrix:
config: ['release', 'debug']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -17,6 +20,6 @@ jobs:
sudo apt-get update sudo apt-get update
sudo apt-get install qtbase5-dev qtbase5-dev-tools qt5-qmake zlib1g-dev sudo apt-get install qtbase5-dev qtbase5-dev-tools qt5-qmake zlib1g-dev
- name: Configure build - name: Configure build
run: qmake pbfplugin.pro run: qmake CONFIG+=${{ matrix.config }} pbfplugin.pro
- name: Build project - name: Build project
run: make -j2 run: make -j4

View File

@ -15,7 +15,7 @@ jobs:
- name: Install Qt - name: Install Qt
uses: jurplel/install-qt-action@v4 uses: jurplel/install-qt-action@v4
with: with:
version: '6.8.1' version: '6.8.2'
- name: Configure build - name: Configure build
run: qmake pbfplugin.pro QMAKE_APPLE_DEVICE_ARCHS="x86_64h arm64" run: qmake pbfplugin.pro QMAKE_APPLE_DEVICE_ARCHS="x86_64h arm64"
- name: Build project - name: Build project

View File

@ -67,7 +67,7 @@ repository.
## Build ## Build
### Requirements ### Requirements
* Qt5 >= 5.11 or Qt6 * Qt5 >= 5.15 or Qt6
* Zlib * Zlib
### Build steps ### Build steps

View File

@ -2,7 +2,7 @@ TARGET = pbf
TEMPLATE = lib TEMPLATE = lib
CONFIG += plugin CONFIG += plugin
QT += gui QT += gui
VERSION = 4.1 VERSION = 4.2
HEADERS += src/pbfhandler.h \ HEADERS += src/pbfhandler.h \
src/data.h \ src/data.h \

View File

@ -2,13 +2,6 @@
#include <QPainter> #include <QPainter>
#include "textpathitem.h" #include "textpathitem.h"
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
#define INTERSECTS intersect
#else // QT 5.15
#define INTERSECTS intersects
#endif // QT 5.15
static void swap(const QLineF &line, QPointF *p1, QPointF *p2) static void swap(const QLineF &line, QPointF *p1, QPointF *p2)
{ {
@ -30,10 +23,10 @@ static bool intersection(const QLineF &line, const QRectF &rect, QPointF *p1,
{ {
QPointF *p = p1; QPointF *p = p1;
if (line.INTERSECTS(QLineF(rect.topLeft(), rect.topRight()), p) if (line.intersects(QLineF(rect.topLeft(), rect.topRight()), p)
== QLineF::BoundedIntersection) == QLineF::BoundedIntersection)
p = p2; p = p2;
if (line.INTERSECTS(QLineF(rect.topLeft(), rect.bottomLeft()), p) if (line.intersects(QLineF(rect.topLeft(), rect.bottomLeft()), p)
== QLineF::BoundedIntersection) { == QLineF::BoundedIntersection) {
if (p == p2) { if (p == p2) {
swap(line, p1, p2); swap(line, p1, p2);
@ -41,7 +34,7 @@ static bool intersection(const QLineF &line, const QRectF &rect, QPointF *p1,
} }
p = p2; p = p2;
} }
if (line.INTERSECTS(QLineF(rect.bottomRight(), rect.bottomLeft()), p) if (line.intersects(QLineF(rect.bottomRight(), rect.bottomLeft()), p)
== QLineF::BoundedIntersection) { == QLineF::BoundedIntersection) {
if (p == p2) { if (p == p2) {
swap(line, p1, p2); swap(line, p1, p2);
@ -49,7 +42,7 @@ static bool intersection(const QLineF &line, const QRectF &rect, QPointF *p1,
} }
p = p2; p = p2;
} }
if (line.INTERSECTS(QLineF(rect.bottomRight(), rect.topRight()), p) if (line.intersects(QLineF(rect.bottomRight(), rect.topRight()), p)
== QLineF::BoundedIntersection) { == QLineF::BoundedIntersection) {
if (p == p2) { if (p == p2) {
swap(line, p1, p2); swap(line, p1, p2);
@ -64,16 +57,16 @@ static bool intersection(const QLineF &line, const QRectF &rect, QPointF *p1,
static bool intersection(const QLineF &line, const QRectF &rect, QPointF *p) static bool intersection(const QLineF &line, const QRectF &rect, QPointF *p)
{ {
if (line.INTERSECTS(QLineF(rect.topLeft(), rect.topRight()), p) if (line.intersects(QLineF(rect.topLeft(), rect.topRight()), p)
== QLineF::BoundedIntersection) == QLineF::BoundedIntersection)
return true; return true;
if (line.INTERSECTS(QLineF(rect.topLeft(), rect.bottomLeft()), p) if (line.intersects(QLineF(rect.topLeft(), rect.bottomLeft()), p)
== QLineF::BoundedIntersection) == QLineF::BoundedIntersection)
return true; return true;
if (line.INTERSECTS(QLineF(rect.bottomRight(), rect.bottomLeft()), p) if (line.intersects(QLineF(rect.bottomRight(), rect.bottomLeft()), p)
== QLineF::BoundedIntersection) == QLineF::BoundedIntersection)
return true; return true;
if (line.INTERSECTS(QLineF(rect.bottomRight(), rect.topRight()), p) if (line.intersects(QLineF(rect.bottomRight(), rect.topRight()), p)
== QLineF::BoundedIntersection) == QLineF::BoundedIntersection)
return true; return true;