Port QtPrintSupport to QStringView
Task-number: QTBUG-84319 Change-Id: I4a2407dcf1c2979cd109e7cb3dd7d6395c56b927 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
5c4f470132
commit
60f83a7675
@ -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(),
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user