diff options
author | Mike Kuta <mike@kutasoftware.com> | 2015-02-06 11:34:28 -0500 |
---|---|---|
committer | Andy Shaw <andy.shaw@digia.com> | 2015-03-06 08:23:13 +0000 |
commit | 4ca43c71eb4f1b2cb969a219e3f1d3b12af02309 (patch) | |
tree | 7a204560fb6ab13dde7661c1d8ee3b7a58a879e3 /config.tests/arch | |
parent | 208cd9ebf16afd2b7a5b08d62ac2647b99a3f612 (diff) |
Improved Windows printer support and fixed crashes due to NULL devMode
With certain printer drivers, the PRINTER_INFO_2 can return NULL for
the pDevMode member in the call to GetPrinter() as mentioned on MSDN:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd144911
In many places, Qt first checks that devMode isn't NULL before
dereferencing it. In other places it does not (such as when it
actually attempts to print in QWin32PrintEngine::begin()). Checking
every dereference aside, most printer functionality is removed without
access to the DEVMODE structure. This fix uses DocumentProperties()
to get the DEVMODE information when the first method fails.
[ChangeLog][QtPrintSupport][QPrinter][Windows] Improved Windows printer
support and fixed crashes due to NULL devMode
Task-number: QTBUG-44349
Task-number: QTBUG-43877
Task-number: QTBUG-2251
Change-Id: Iafa337055d967c70f2096dcde4cc9c8ca8a0d252
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Diffstat (limited to 'config.tests/arch')
0 files changed, 0 insertions, 0 deletions