Fix warnings about conversion from const char* to QString.
Change-Id: I6d3dca0688a94eb34b55efc841a75e4ebd3a2bd7 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: John Layt <jlayt@kde.org>
This commit is contained in:
parent
c81d0586b5
commit
e43174755c
@ -517,15 +517,15 @@ void QCUPSSupport::setPagesPerSheetLayout(QPrinter *printer, const PagesPerShee
|
||||
QStringList cupsOptions = cupsOptionsList(printer);
|
||||
static const char *pagesPerSheetData[] = { "1", "2", "4", "6", "9", "16", 0 };
|
||||
static const char *pageLayoutData[] = {"lrtb", "lrbt", "rlbt", "rltb", "btlr", "btrl", "tblr", "tbrl", 0};
|
||||
setCupsOption(cupsOptions, QStringLiteral("number-up"), pagesPerSheetData[pagesPerSheet]);
|
||||
setCupsOption(cupsOptions, QStringLiteral("number-up-layout"), pageLayoutData[pagesPerSheetLayout]);
|
||||
setCupsOption(cupsOptions, QStringLiteral("number-up"), QLatin1String(pagesPerSheetData[pagesPerSheet]));
|
||||
setCupsOption(cupsOptions, QStringLiteral("number-up-layout"), QLatin1String(pageLayoutData[pagesPerSheetLayout]));
|
||||
setCupsOptions(printer, cupsOptions);
|
||||
}
|
||||
|
||||
void QCUPSSupport::setPageRange(QPrinter *printer, int pageFrom, int pageTo)
|
||||
{
|
||||
QStringList cupsOptions = cupsOptionsList(printer);
|
||||
setCupsOption(cupsOptions, QStringLiteral("page-ranges"), QString("%1-%2").arg(pageFrom).arg(pageTo));
|
||||
setCupsOption(cupsOptions, QStringLiteral("page-ranges"), QStringLiteral("%1-%2").arg(pageFrom).arg(pageTo));
|
||||
setCupsOptions(printer, cupsOptions);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user