summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel/qprintengine_win.cpp
diff options
context:
space:
mode:
authorMarko Kangas <marko.kangas@theqtcompany.com>2015-04-14 09:42:56 +0300
committerMarko Kangas <marko.kangas@theqtcompany.com>2015-04-15 11:57:59 +0000
commit336648aa1b2f5249749068989959238039f44033 (patch)
treeb83d003ad448d7f2dabe6b43d2c545fc710036f4 /src/printsupport/kernel/qprintengine_win.cpp
parentd605883b5e8e8cb272fab760cd4896d006ce0719 (diff)
Fix windows printing "invalid metric command" warning.
Added missing PdmDevicePixelRatio return value to printEngine::metric. Change-Id: I40198208ff7c95aa30b0492c410b450a1ae16a30 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Diffstat (limited to 'src/printsupport/kernel/qprintengine_win.cpp')
-rw-r--r--src/printsupport/kernel/qprintengine_win.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/printsupport/kernel/qprintengine_win.cpp b/src/printsupport/kernel/qprintengine_win.cpp
index 731e923b2b..b377401ed9 100644
--- a/src/printsupport/kernel/qprintengine_win.cpp
+++ b/src/printsupport/kernel/qprintengine_win.cpp
@@ -384,6 +384,9 @@ int QWin32PrintEngine::metric(QPaintDevice::PaintDeviceMetric m) const
case QPaintDevice::PdmDepth:
val = GetDeviceCaps(d->hdc, PLANES);
break;
+ case QPaintDevice::PdmDevicePixelRatio:
+ val = 1;
+ break;
default:
qWarning("QPrinter::metric: Invalid metric command");
return 0;