summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-24 09:58:17 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-24 14:22:57 +0200
commit22bf3a45112cfef21971362503794b79818ba54c (patch)
tree744a4c844b3a894a402457f93f11b1824bc4626f /src
parent90231f5ab21bc9d2e60d1452c4ea7c4b93dbe571 (diff)
QWindowsPrintDevice: Fix signedness warnings
Remove the warnings suppression. Task-number: QTBUG-83259 Change-Id: I3d8852ce8f62bac9b8f6ca4e13892164fb6d4059 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/printsupport/platform/windows/qwindowsprintdevice.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/printsupport/platform/windows/qwindowsprintdevice.cpp b/src/printsupport/platform/windows/qwindowsprintdevice.cpp
index 0e9728e5eb..a6aa9c6504 100644
--- a/src/printsupport/platform/windows/qwindowsprintdevice.cpp
+++ b/src/printsupport/platform/windows/qwindowsprintdevice.cpp
@@ -48,7 +48,6 @@
QT_BEGIN_NAMESPACE
-QT_WARNING_DISABLE_GCC("-Wsign-compare")
using WindowsPrinterLookup = QList<QWindowsPrinterInfo>;
Q_GLOBAL_STATIC(WindowsPrinterLookup, windowsDeviceLookup);
@@ -204,8 +203,8 @@ QPrint::DeviceState QWindowsPrintDevice::state() const
void QWindowsPrintDevice::loadPageSizes() const
{
// Get the number of paper sizes and check all 3 attributes have same count
- DWORD paperCount = DeviceCapabilities(wcharId(), nullptr, DC_PAPERNAMES, nullptr, nullptr);
- if (int(paperCount) > 0
+ const int paperCount = DeviceCapabilities(wcharId(), nullptr, DC_PAPERNAMES, nullptr, nullptr);
+ if (paperCount > 0
&& DeviceCapabilities(wcharId(), nullptr, DC_PAPERSIZE, nullptr, nullptr) == paperCount
&& DeviceCapabilities(wcharId(), nullptr, DC_PAPERS, nullptr, nullptr) == paperCount) {
@@ -317,8 +316,8 @@ QMarginsF QWindowsPrintDevice::printableMargins(const QPageSize &pageSize,
void QWindowsPrintDevice::loadResolutions() const
{
- DWORD resCount = DeviceCapabilities(wcharId(), nullptr, DC_ENUMRESOLUTIONS, nullptr, nullptr);
- if (int(resCount) > 0) {
+ const int resCount = DeviceCapabilities(wcharId(), nullptr, DC_ENUMRESOLUTIONS, nullptr, nullptr);
+ if (resCount > 0) {
QScopedArrayPointer<LONG> resolutions(new LONG[resCount*2]);
// Get the details and match the default paper size
if (DeviceCapabilities(wcharId(), nullptr, DC_ENUMRESOLUTIONS,
@@ -354,8 +353,8 @@ int QWindowsPrintDevice::defaultResolution() const
void QWindowsPrintDevice::loadInputSlots() const
{
const auto printerId = wcharId();
- DWORD binCount = DeviceCapabilities(printerId, nullptr, DC_BINS, nullptr, nullptr);
- if (int(binCount) > 0
+ const int binCount = DeviceCapabilities(printerId, nullptr, DC_BINS, nullptr, nullptr);
+ if (binCount > 0
&& DeviceCapabilities(printerId, nullptr, DC_BINNAMES, nullptr, nullptr) == binCount) {
QScopedArrayPointer<WORD> bins(new WORD[binCount]);