summaryrefslogtreecommitdiffstats
path: root/src/plugins/printsupport/cups/qcupsprintengine.cpp
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals.cid@kdab.com>2018-02-05 11:01:01 +0100
committerAlbert Astals Cid <albert.astals.cid@kdab.com>2018-02-05 13:53:33 +0000
commit10b9ff0a4de5eb88d8cac4a87265c032cc04718f (patch)
tree7f90b95ffafd8e8c1a662d27d3e6382b63be6ed9 /src/plugins/printsupport/cups/qcupsprintengine.cpp
parentfadaf7053d067e3346ce2b000b700dfc918448f2 (diff)
Remove QCupsPrintEnginePrivate::setupDefaultPrinter
it was declared but never used Change-Id: Iededb2943759cd2d66de95bcc1758dbcc4283ee3 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/plugins/printsupport/cups/qcupsprintengine.cpp')
-rw-r--r--src/plugins/printsupport/cups/qcupsprintengine.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/plugins/printsupport/cups/qcupsprintengine.cpp b/src/plugins/printsupport/cups/qcupsprintengine.cpp
index 763f676e41..bd0d641e79 100644
--- a/src/plugins/printsupport/cups/qcupsprintengine.cpp
+++ b/src/plugins/printsupport/cups/qcupsprintengine.cpp
@@ -250,38 +250,6 @@ void QCupsPrintEnginePrivate::closePrintDevice()
}
}
-void QCupsPrintEnginePrivate::setupDefaultPrinter()
-{
- // Should never have reached here if no plugin available, but check just in case
- QPlatformPrinterSupport *ps = QPlatformPrinterSupportPlugin::get();
- if (!ps)
- return;
-
- // Get default printer id, if no default then use the first available
- // TODO Find way to remove printerName from base class?
- printerName = ps->defaultPrintDeviceId();
- if (printerName.isEmpty()) {
- QStringList list = ps->availablePrintDeviceIds();
- if (list.size() > 0)
- printerName = list.at(0);
- }
-
- // Should never have reached here if no printers available, but check just in case
- if (printerName.isEmpty())
- return;
-
- m_printDevice = ps->createPrintDevice(printerName);
- if (!m_printDevice.isValid())
- return;
-
- // Setup the printer defaults
- duplex = m_printDevice.defaultDuplexMode();
- grayscale = m_printDevice.defaultColorMode() == QPrint::GrayScale;
- // CUPS server always supports collation, even if individual m_printDevice doesn't
- collate = true;
- setPageSize(m_printDevice.defaultPageSize());
-}
-
void QCupsPrintEnginePrivate::changePrinter(const QString &newPrinter)
{
// Don't waste time if same printer name