mirror of
https://github.com/tumic0/QtPBFImagePlugin.git
synced 2025-02-21 10:30:49 +01:00
Remove all Qt5 < 5.15 workarounds.
Qt 5.15 is now the minimal required Qt version.
This commit is contained in:
parent
56e83ea6d9
commit
baff6ac17d
7
.github/workflows/linux.yml
vendored
7
.github/workflows/linux.yml
vendored
@ -8,7 +8,10 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
name: QtPBFImagePlugin
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
config: ['release', 'debug']
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@ -17,6 +20,6 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install qtbase5-dev qtbase5-dev-tools qt5-qmake zlib1g-dev
|
||||
- name: Configure build
|
||||
run: qmake pbfplugin.pro
|
||||
run: qmake CONFIG+=${{ matrix.config }} pbfplugin.pro
|
||||
- name: Build project
|
||||
run: make -j2
|
||||
|
@ -67,7 +67,7 @@ repository.
|
||||
|
||||
## Build
|
||||
### Requirements
|
||||
* Qt5 >= 5.11 or Qt6
|
||||
* Qt5 >= 5.15 or Qt6
|
||||
* Zlib
|
||||
|
||||
### Build steps
|
||||
|
@ -2,13 +2,6 @@
|
||||
#include <QPainter>
|
||||
#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)
|
||||
{
|
||||
|
||||
@ -30,10 +23,10 @@ static bool intersection(const QLineF &line, const QRectF &rect, QPointF *p1,
|
||||
{
|
||||
QPointF *p = p1;
|
||||
|
||||
if (line.INTERSECTS(QLineF(rect.topLeft(), rect.topRight()), p)
|
||||
if (line.intersects(QLineF(rect.topLeft(), rect.topRight()), p)
|
||||
== QLineF::BoundedIntersection)
|
||||
p = p2;
|
||||
if (line.INTERSECTS(QLineF(rect.topLeft(), rect.bottomLeft()), p)
|
||||
if (line.intersects(QLineF(rect.topLeft(), rect.bottomLeft()), p)
|
||||
== QLineF::BoundedIntersection) {
|
||||
if (p == p2) {
|
||||
swap(line, p1, p2);
|
||||
@ -41,7 +34,7 @@ static bool intersection(const QLineF &line, const QRectF &rect, QPointF *p1,
|
||||
}
|
||||
p = p2;
|
||||
}
|
||||
if (line.INTERSECTS(QLineF(rect.bottomRight(), rect.bottomLeft()), p)
|
||||
if (line.intersects(QLineF(rect.bottomRight(), rect.bottomLeft()), p)
|
||||
== QLineF::BoundedIntersection) {
|
||||
if (p == p2) {
|
||||
swap(line, p1, p2);
|
||||
@ -49,7 +42,7 @@ static bool intersection(const QLineF &line, const QRectF &rect, QPointF *p1,
|
||||
}
|
||||
p = p2;
|
||||
}
|
||||
if (line.INTERSECTS(QLineF(rect.bottomRight(), rect.topRight()), p)
|
||||
if (line.intersects(QLineF(rect.bottomRight(), rect.topRight()), p)
|
||||
== QLineF::BoundedIntersection) {
|
||||
if (p == 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)
|
||||
{
|
||||
if (line.INTERSECTS(QLineF(rect.topLeft(), rect.topRight()), p)
|
||||
if (line.intersects(QLineF(rect.topLeft(), rect.topRight()), p)
|
||||
== QLineF::BoundedIntersection)
|
||||
return true;
|
||||
if (line.INTERSECTS(QLineF(rect.topLeft(), rect.bottomLeft()), p)
|
||||
if (line.intersects(QLineF(rect.topLeft(), rect.bottomLeft()), p)
|
||||
== QLineF::BoundedIntersection)
|
||||
return true;
|
||||
if (line.INTERSECTS(QLineF(rect.bottomRight(), rect.bottomLeft()), p)
|
||||
if (line.intersects(QLineF(rect.bottomRight(), rect.bottomLeft()), p)
|
||||
== QLineF::BoundedIntersection)
|
||||
return true;
|
||||
if (line.INTERSECTS(QLineF(rect.bottomRight(), rect.topRight()), p)
|
||||
if (line.intersects(QLineF(rect.bottomRight(), rect.topRight()), p)
|
||||
== QLineF::BoundedIntersection)
|
||||
return true;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user