simplify and use the same code for Qt5 & Qt6

When reading and comparing Qt5-docs and Qt6-docs, I read,
that there are no differences in the functions!
So it is not necessary to have the differentiation
between the Qt-Versions.
Code compiles without errors or warnings for Qt5 and Qt6.
This commit is contained in:
plc-user
2025-03-02 18:56:34 +01:00
parent 6ff518ec3b
commit 4009e6aaab
6 changed files with 2 additions and 54 deletions

View File

@@ -54,14 +54,7 @@ void PartRectangle::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt
Q_UNUSED(widget);
applyStylesToQPainter(*painter);
QPen t = painter -> pen();
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove
t.setCosmetic(options && options -> levelOfDetail < 1.0);
#else
#if TODO_LIST
#pragma message("@TODO remove code for QT 6 or later")
#endif
t.setCosmetic(options && options -> levelOfDetailFromTransform(painter->worldTransform()) < 1.0);
#endif
if (isSelected())
t.setColor(Qt::red);