summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-12-17 16:56:56 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-12-17 16:56:56 +0100
commite2d4b998db7b9f12d47f9ae83e411e4c66fdd49f (patch)
treebaa1608d572789503aaa08d1bded85419c591158 /src
parent630906288d65705e2b66d1fbc07a478bf15d498f (diff)
parent04e9f7f21a4c8faffdb342a141039096f00bb332 (diff)
downloadqtsvg-e2d4b998db7b9f12d47f9ae83e411e4c66fdd49f.tar.gz
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts: .qmake.conf Change-Id: I6429aa789e022fedababb8ec6bca144f7ce8721f
Diffstat (limited to 'src')
-rw-r--r--src/svg/qgraphicssvgitem.cpp2
-rw-r--r--src/svg/qgraphicssvgitem.h4
-rw-r--r--src/svg/qsvggenerator.cpp2
3 files changed, 5 insertions, 3 deletions
diff --git a/src/svg/qgraphicssvgitem.cpp b/src/svg/qgraphicssvgitem.cpp
index 642f793..4d2b916 100644
--- a/src/svg/qgraphicssvgitem.cpp
+++ b/src/svg/qgraphicssvgitem.cpp
@@ -32,7 +32,7 @@
****************************************************************************/
#include "qgraphicssvgitem.h"
-#ifndef QT_NO_WIDGETS
+#if !defined(QT_NO_GRAPHICSVIEW) && !defined(QT_NO_WIDGETS)
#include "qpainter.h"
#include "qstyleoption.h"
diff --git a/src/svg/qgraphicssvgitem.h b/src/svg/qgraphicssvgitem.h
index 1626131..8af0d1e 100644
--- a/src/svg/qgraphicssvgitem.h
+++ b/src/svg/qgraphicssvgitem.h
@@ -35,7 +35,7 @@
#include <QtCore/qglobal.h>
-#ifndef QT_NO_WIDGETS
+#if !defined(QT_NO_GRAPHICSVIEW) && !defined(QT_NO_WIDGETS)
#include <QtWidgets/qgraphicsitem.h>
@@ -88,6 +88,6 @@ private:
QT_END_NAMESPACE
-#endif // QT_NO_WIDGETS
+#endif // QT_NO_GRAPHICSVIEW or QT_NO_WIDGETS
#endif // QGRAPHICSSVGITEM_H
diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp
index a06170f..a282614 100644
--- a/src/svg/qsvggenerator.cpp
+++ b/src/svg/qsvggenerator.cpp
@@ -793,6 +793,8 @@ int QSvgGenerator::metric(QPaintDevice::PaintDeviceMetric metric) const
return d->engine->resolution();
case QPaintDevice::PdmPhysicalDpiY:
return d->engine->resolution();
+ case QPaintDevice::PdmDevicePixelRatio:
+ return 1;
default:
qWarning("QSvgGenerator::metric(), unhandled metric %d\n", metric);
break;