QWindowsPrintDevice: Fix signedness warnings
Remove the warnings suppression. Task-number: QTBUG-83259 Change-Id: I3d8852ce8f62bac9b8f6ca4e13892164fb6d4059 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
90231f5ab2
commit
22bf3a4511
@ -48,7 +48,6 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
QT_WARNING_DISABLE_GCC("-Wsign-compare")
|
|
||||||
using WindowsPrinterLookup = QList<QWindowsPrinterInfo>;
|
using WindowsPrinterLookup = QList<QWindowsPrinterInfo>;
|
||||||
Q_GLOBAL_STATIC(WindowsPrinterLookup, windowsDeviceLookup);
|
Q_GLOBAL_STATIC(WindowsPrinterLookup, windowsDeviceLookup);
|
||||||
|
|
||||||
@ -204,8 +203,8 @@ QPrint::DeviceState QWindowsPrintDevice::state() const
|
|||||||
void QWindowsPrintDevice::loadPageSizes() const
|
void QWindowsPrintDevice::loadPageSizes() const
|
||||||
{
|
{
|
||||||
// Get the number of paper sizes and check all 3 attributes have same count
|
// Get the number of paper sizes and check all 3 attributes have same count
|
||||||
DWORD paperCount = DeviceCapabilities(wcharId(), nullptr, DC_PAPERNAMES, nullptr, nullptr);
|
const int paperCount = DeviceCapabilities(wcharId(), nullptr, DC_PAPERNAMES, nullptr, nullptr);
|
||||||
if (int(paperCount) > 0
|
if (paperCount > 0
|
||||||
&& DeviceCapabilities(wcharId(), nullptr, DC_PAPERSIZE, nullptr, nullptr) == paperCount
|
&& DeviceCapabilities(wcharId(), nullptr, DC_PAPERSIZE, nullptr, nullptr) == paperCount
|
||||||
&& DeviceCapabilities(wcharId(), nullptr, DC_PAPERS, 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
|
void QWindowsPrintDevice::loadResolutions() const
|
||||||
{
|
{
|
||||||
DWORD resCount = DeviceCapabilities(wcharId(), nullptr, DC_ENUMRESOLUTIONS, nullptr, nullptr);
|
const int resCount = DeviceCapabilities(wcharId(), nullptr, DC_ENUMRESOLUTIONS, nullptr, nullptr);
|
||||||
if (int(resCount) > 0) {
|
if (resCount > 0) {
|
||||||
QScopedArrayPointer<LONG> resolutions(new LONG[resCount*2]);
|
QScopedArrayPointer<LONG> resolutions(new LONG[resCount*2]);
|
||||||
// Get the details and match the default paper size
|
// Get the details and match the default paper size
|
||||||
if (DeviceCapabilities(wcharId(), nullptr, DC_ENUMRESOLUTIONS,
|
if (DeviceCapabilities(wcharId(), nullptr, DC_ENUMRESOLUTIONS,
|
||||||
@ -354,8 +353,8 @@ int QWindowsPrintDevice::defaultResolution() const
|
|||||||
void QWindowsPrintDevice::loadInputSlots() const
|
void QWindowsPrintDevice::loadInputSlots() const
|
||||||
{
|
{
|
||||||
const auto printerId = wcharId();
|
const auto printerId = wcharId();
|
||||||
DWORD binCount = DeviceCapabilities(printerId, nullptr, DC_BINS, nullptr, nullptr);
|
const int binCount = DeviceCapabilities(printerId, nullptr, DC_BINS, nullptr, nullptr);
|
||||||
if (int(binCount) > 0
|
if (binCount > 0
|
||||||
&& DeviceCapabilities(printerId, nullptr, DC_BINNAMES, nullptr, nullptr) == binCount) {
|
&& DeviceCapabilities(printerId, nullptr, DC_BINNAMES, nullptr, nullptr) == binCount) {
|
||||||
|
|
||||||
QScopedArrayPointer<WORD> bins(new WORD[binCount]);
|
QScopedArrayPointer<WORD> bins(new WORD[binCount]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user