diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2010-12-01 10:46:24 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2010-12-20 15:14:33 (GMT) |
commit | 50af3716c956be0f50fdd896925da7af91d5da2c (patch) | |
tree | 880c47d07f6d9b536da32d2c08acfacdcc1df45a /src/gui/painting/qprinterinfo_unix.cpp | |
parent | ed2abc6f5d8b2fe9e819d473768767c11f9c83ba (diff) | |
download | Qt-50af3716c956be0f50fdd896925da7af91d5da2c.zip Qt-50af3716c956be0f50fdd896925da7af91d5da2c.tar.gz Qt-50af3716c956be0f50fdd896925da7af91d5da2c.tar.bz2 |
QPrinterInfo::supportedPaperSizes(): return early if the info is invalid
e.g. don't report supported paper sized in any case
Merge-request: 2516
Signed-off-by: axis
Diffstat (limited to 'src/gui/painting/qprinterinfo_unix.cpp')
-rw-r--r-- | src/gui/painting/qprinterinfo_unix.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/painting/qprinterinfo_unix.cpp b/src/gui/painting/qprinterinfo_unix.cpp index be24bd7..af2e52a 100644 --- a/src/gui/painting/qprinterinfo_unix.cpp +++ b/src/gui/painting/qprinterinfo_unix.cpp @@ -898,6 +898,9 @@ QList<QPrinter::PaperSize> QPrinterInfo::supportedPaperSizes() const #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) const Q_D(QPrinterInfo); + if (isNull()) + return d->paperSizes; + if (!d->hasPaperSizes) { d->hasPaperSizes = true; |