r24869 by craig - Qt6 build fix: replace obsolete

scribus-commit scribus-commit at lists.scribus.net
Sun Jan 30 18:00:32 UTC 2022


Author: craig
Date: Sun Jan 30 18:00:32 2022
New Revision: 24869

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24869
Log:
Qt6 build fix: replace obsolete
QStyleOptionGraphicsItem::levelOfDetail()

Modified:
    trunk/Scribus/scribus/plugins/tools/lenseffects/lensdialog.cpp

Modified: trunk/Scribus/scribus/plugins/tools/lenseffects/lensdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24869&path=/trunk/Scribus/scribus/plugins/tools/lenseffects/lensdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/lenseffects/lensdialog.cpp	(original)
+++ trunk/Scribus/scribus/plugins/tools/lenseffects/lensdialog.cpp	Sun Jan 30 18:00:32 2022
@@ -61,7 +61,8 @@
 void LensItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *item, QWidget *widget)
 {
 	Q_UNUSED(widget);
-	painter->setPen(QPen(Qt::black, 1.0 / item->levelOfDetail));
+	qreal painterLevelOfDetail = item->levelOfDetailFromTransform(painter->worldTransform());
+	painter->setPen(QPen(Qt::black, 1.0 / painterLevelOfDetail));
 	QRadialGradient radialGrad(QPointF(0.5, 0.5), 1.0);
 	radialGrad.setColorAt(0.0, QColor(255, 0, 0, 127));
 	radialGrad.setColorAt(0.1, QColor(255, 0, 0, 127));
@@ -71,11 +72,11 @@
 	painter->drawEllipse(rect().toRect());
 	if (item->state & QStyle::State_Selected)
 	{
-		scaling = item->levelOfDetail;
-		double siz = 6.0 / item->levelOfDetail;
+		scaling = painterLevelOfDetail;
+		double siz = 6.0 / painterLevelOfDetail;
 		QRectF br = boundingRect();
 		painter->setBrush(Qt::NoBrush);
-		painter->setPen(QPen(Qt::red, 1.0 / item->levelOfDetail, Qt::DotLine));
+		painter->setPen(QPen(Qt::red, 1.0 / painterLevelOfDetail, Qt::DotLine));
 		painter->drawRect(br);
 		painter->setBrush(Qt::red);
 		painter->setPen(Qt::NoPen);




More information about the scribus-commit mailing list