Printsupport: replace remaining uses of QL1String with QL1StringView

Task-number: QTBUG-98434
Change-Id: Ibeb9608d3ebc3c0c2e7ea93561e24cb24c601fec
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Sona Kurazyan 2022-04-14 14:41:37 +02:00
parent 42c8f56acc
commit 5ec4b0b8e8
2 changed files with 3 additions and 3 deletions

View File

@ -352,7 +352,7 @@ void QPrintPreviewDialogPrivate::init(QPrinter *_printer)
preview->setFocus();
}
static inline void qt_setupActionIcon(QAction *action, QLatin1String name)
static inline void qt_setupActionIcon(QAction *action, QLatin1StringView name)
{
const auto imagePrefix = ":/qt-project.org/dialogs/qprintpreviewdialog/images/"_L1;
QIcon icon = QIcon::fromTheme(name);

View File

@ -277,8 +277,8 @@ void QCUPSSupport::setPagesPerSheetLayout(QPrinter *printer, const PagesPerShee
// WARNING: and it is the last one (before the "\0")!
static const char pagesPerSheetData[][2] = { "1", "2", "4", "6", "9", {'1', '6'}, "\0" };
static const char pageLayoutData[][5] = {"lrtb", "lrbt", "rlbt", "rltb", "btlr", "btrl", "tblr", "tbrl"};
setCupsOption(printer, QStringLiteral("number-up"), QLatin1String(pagesPerSheetData[pagesPerSheet]));
setCupsOption(printer, QStringLiteral("number-up-layout"), QLatin1String(pageLayoutData[pagesPerSheetLayout]));
setCupsOption(printer, QStringLiteral("number-up"), QLatin1StringView(pagesPerSheetData[pagesPerSheet]));
setCupsOption(printer, QStringLiteral("number-up-layout"), QLatin1StringView(pageLayoutData[pagesPerSheetLayout]));
}
void QCUPSSupport::setPageRange(QPrinter *printer, int pageFrom, int pageTo)