diff options
author | Marcel Krems <m.krems@software-vision.eu> | 2020-08-24 20:48:06 +0200 |
---|---|---|
committer | Marcel Krems <m.krems@software-vision.eu> | 2020-08-25 06:48:28 +0200 |
commit | fcc25b11bbb8393ef3e0738bee107d52ea553111 (patch) | |
tree | b19721da89a44f947158467ca8b3f190aa8f673c | |
parent | 311d7a609c99a499a27f66c8242744990bfceb92 (diff) |
QPrinterInfo: Remove deprecated methods
Change-Id: I5089bc23308a4348dc21122dfa000d5ca6e3938d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/printsupport/kernel/qprinterinfo.cpp | 45 | ||||
-rw-r--r-- | src/printsupport/kernel/qprinterinfo.h | 5 | ||||
-rw-r--r-- | tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp | 12 |
3 files changed, 0 insertions, 62 deletions
diff --git a/src/printsupport/kernel/qprinterinfo.cpp b/src/printsupport/kernel/qprinterinfo.cpp index 167b2361ef..c285f9afc5 100644 --- a/src/printsupport/kernel/qprinterinfo.cpp +++ b/src/printsupport/kernel/qprinterinfo.cpp @@ -313,51 +313,6 @@ QPageSize QPrinterInfo::maximumPhysicalPageSize() const return QPageSize(d->m_printDevice.maximumPhysicalPageSize(), QString(), QPageSize::ExactMatch); } -#if QT_DEPRECATED_SINCE(5,3) -/*! - \obsolete Use supportedPageSizes() instead. - - Returns a list of supported paper sizes by the printer. - - Not all printer drivers support this query, so the list may be empty. - - \since 4.4 -*/ - -QList<QPrinter::PaperSize> QPrinterInfo::supportedPaperSizes() const -{ - Q_D(const QPrinterInfo); - QList<QPrinter::PaperSize> list; - const QList<QPageSize> supportedPageSizes = d->m_printDevice.supportedPageSizes(); - list.reserve(supportedPageSizes.size()); - for (const QPageSize &pageSize : supportedPageSizes) - list.append(QPrinter::PaperSize(pageSize.id())); - return list; -} - -/*! - \obsolete Use supportedPageSizes() instead. - - Returns a list of all the paper names supported by the driver with the - corresponding size in millimeters. - - Not all printer drivers support this query, so the list may be empty. - - \since 5.1 -*/ - -QList<QPair<QString, QSizeF> > QPrinterInfo::supportedSizesWithNames() const -{ - Q_D(const QPrinterInfo); - QList<QPair<QString, QSizeF> > list; - const QList<QPageSize> supportedPageSizes = d->m_printDevice.supportedPageSizes(); - list.reserve(supportedPageSizes.size()); - for (const QPageSize &pageSize : supportedPageSizes) - list.append(qMakePair(pageSize.name(), pageSize.size(QPageSize::Millimeter))); - return list; -} -#endif // QT_DEPRECATED_SINCE(5,3) - /*! Returns a list of resolutions supported by this printer. diff --git a/src/printsupport/kernel/qprinterinfo.h b/src/printsupport/kernel/qprinterinfo.h index 7195cb76b5..f97b79b486 100644 --- a/src/printsupport/kernel/qprinterinfo.h +++ b/src/printsupport/kernel/qprinterinfo.h @@ -83,11 +83,6 @@ public: QPageSize minimumPhysicalPageSize() const; QPageSize maximumPhysicalPageSize() const; -#if QT_DEPRECATED_SINCE(5,3) - QT_DEPRECATED QList<QPrinter::PaperSize> supportedPaperSizes() const; - QT_DEPRECATED QList<QPair<QString, QSizeF> > supportedSizesWithNames() const; -#endif // QT_DEPRECATED_SINCE(5,3) - QList<int> supportedResolutions() const; QPrinter::DuplexMode defaultDuplexMode() const; diff --git a/tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp b/tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp index 81b49a3a87..efd9e77455 100644 --- a/tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp +++ b/tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp @@ -302,12 +302,6 @@ void tst_QPrinterInfo::testConstructors() QCOMPARE(copy1.minimumPhysicalPageSize(), printers.at(i).minimumPhysicalPageSize()); QCOMPARE(copy1.maximumPhysicalPageSize(), printers.at(i).maximumPhysicalPageSize()); QCOMPARE(copy1.supportedPageSizes(), printers.at(i).supportedPageSizes()); -#if QT_DEPRECATED_SINCE(5, 3) -QT_WARNING_PUSH -QT_WARNING_DISABLE_DEPRECATED - QCOMPARE(copy1.supportedSizesWithNames(), printers.at(i).supportedSizesWithNames()); -QT_WARNING_POP -#endif QCOMPARE(copy1.supportedResolutions(), printers.at(i).supportedResolutions()); QCOMPARE(copy1.defaultDuplexMode(), printers.at(i).defaultDuplexMode()); QCOMPARE(copy1.supportedDuplexModes(), printers.at(i).supportedDuplexModes()); @@ -328,12 +322,6 @@ QT_WARNING_POP QCOMPARE(copy2.minimumPhysicalPageSize(), printers.at(i).minimumPhysicalPageSize()); QCOMPARE(copy2.maximumPhysicalPageSize(), printers.at(i).maximumPhysicalPageSize()); QCOMPARE(copy2.supportedPageSizes(), printers.at(i).supportedPageSizes()); -#if QT_DEPRECATED_SINCE(5, 3) - QT_WARNING_PUSH - QT_WARNING_DISABLE_DEPRECATED - QCOMPARE(copy2.supportedSizesWithNames(), printers.at(i).supportedSizesWithNames()); - QT_WARNING_POP -#endif QCOMPARE(copy2.supportedResolutions(), printers.at(i).supportedResolutions()); QCOMPARE(copy2.defaultDuplexMode(), printers.at(i).defaultDuplexMode()); QCOMPARE(copy2.supportedDuplexModes(), printers.at(i).supportedDuplexModes()); |