From 9c99a13d9e72824b4d6cf71d56893f7d96bf8498 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 16 Jul 2018 14:00:53 +0200 Subject: Windows: Cache the printer capability information the first time As remote based printers can be slow to query, meaning that it will take time to check all the capabilities, especially if the QPrinter is recreated on need. Then the information should be cached and reused if the printer is deemed to be the same. Change-Id: If8f9626c0d44113c698b4f61bbd197157932ccbe Reviewed-by: Friedemann Kleint --- src/printsupport/kernel/qplatformprintdevice.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/printsupport') diff --git a/src/printsupport/kernel/qplatformprintdevice.h b/src/printsupport/kernel/qplatformprintdevice.h index 14701271c3..d95a5add9b 100644 --- a/src/printsupport/kernel/qplatformprintdevice.h +++ b/src/printsupport/kernel/qplatformprintdevice.h @@ -1,6 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2014 John Layt +** Copyright (C) 2018 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtPrintSupport module of the Qt Toolkit. @@ -151,16 +152,16 @@ protected: bool m_isRemote; - bool m_supportsMultipleCopies; - bool m_supportsCollateCopies; + mutable bool m_supportsMultipleCopies; + mutable bool m_supportsCollateCopies; mutable bool m_havePageSizes; mutable QList m_pageSizes; - bool m_supportsCustomPageSizes; + mutable bool m_supportsCustomPageSizes; - QSize m_minimumPhysicalPageSize; - QSize m_maximumPhysicalPageSize; + mutable QSize m_minimumPhysicalPageSize; + mutable QSize m_maximumPhysicalPageSize; mutable bool m_haveResolutions; mutable QList m_resolutions; -- cgit v1.2.3