diff options
author | Andy Shaw <andy.shaw@qt.io> | 2018-07-16 14:00:53 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2018-07-20 07:49:40 +0000 |
commit | 9c99a13d9e72824b4d6cf71d56893f7d96bf8498 (patch) | |
tree | 8d19be572f9cfd3fb76a9b226b9d716176c5514d /src/printsupport | |
parent | 588fcde580c253bb12ca9142a57a18c79fa3c4a0 (diff) |
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 <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/printsupport')
-rw-r--r-- | src/printsupport/kernel/qplatformprintdevice.h | 11 |
1 files changed, 6 insertions, 5 deletions
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 <jlayt@kde.org> +** 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<QPageSize> 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<int> m_resolutions; |