summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-05-27 13:08:49 +0200
committerLars Knoll <lars.knoll@qt.io>2020-06-11 06:52:54 +0200
commit60f83a76756342de66d0d97353e8392083deae3a (patch)
tree8d228a922b57ecfd565a61f33058c8baef3e5062
parent5c4f470132de1bd0ac33e05309184229b5fcb015 (diff)
Port QtPrintSupport to QStringView
Task-number: QTBUG-84319 Change-Id: I4a2407dcf1c2979cd109e7cb3dd7d6395c56b927 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/plugins/printsupport/cups/qcupsprintengine.cpp2
-rw-r--r--src/plugins/printsupport/cups/qppdprintdevice.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/printsupport/cups/qcupsprintengine.cpp b/src/plugins/printsupport/cups/qcupsprintengine.cpp
index 43d5e119ad..d09b2b5a69 100644
--- a/src/plugins/printsupport/cups/qcupsprintengine.cpp
+++ b/src/plugins/printsupport/cups/qcupsprintengine.cpp
@@ -249,7 +249,7 @@ void QCupsPrintEnginePrivate::closePrintDevice()
// Print the file
// Cups expect the printer original name without instance, the full name is used only to retrieve the configuration
- const auto parts = printerName.splitRef(QLatin1Char('/'));
+ const auto parts = QStringView{printerName}.split(QLatin1Char('/'));
const auto printerOriginalName = parts.at(0);
cups_option_t* optPtr = cupsOptStruct.size() ? &cupsOptStruct.first() : 0;
cupsPrintFile(printerOriginalName.toLocal8Bit().constData(), tempFile.toLocal8Bit().constData(),
diff --git a/src/plugins/printsupport/cups/qppdprintdevice.cpp b/src/plugins/printsupport/cups/qppdprintdevice.cpp
index 8bfa239dbe..b63a349269 100644
--- a/src/plugins/printsupport/cups/qppdprintdevice.cpp
+++ b/src/plugins/printsupport/cups/qppdprintdevice.cpp
@@ -60,7 +60,7 @@ QPpdPrintDevice::QPpdPrintDevice(const QString &id)
if (!id.isEmpty()) {
// TODO For now each dest is an individual device
- const auto parts = id.splitRef(QLatin1Char('/'));
+ const auto parts = QStringView{id}.split(QLatin1Char('/'));
m_cupsName = parts.at(0).toUtf8();
if (parts.size() > 1)
m_cupsInstance = parts.at(1).toUtf8();